vagrant-sptsync 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/vagrant-sptsync/commands/root.rb +35 -5
- data/lib/vagrant-sptsync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2QwNWQwMWFmNDE0NWMxOGIyMzE3ZWYxYmU0MzUyMjE1NjUyNDM5Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2QxMzg1MTdmMTNlZGUzMDA2ODYzZDNkOTY1YmE1MWU0ZjIzMjg5NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzlhODZjMWVlYzBmNDU1ZTBmNDUxZDM3MjIzODZlODE2YjlhOWRkYzM5Zjll
|
10
|
+
MDlkZDgxMWU0NjllZjk2ODlhZGVjMTVmOGVlNjUzMzA0ZTFkNTQ4NzRiZGJl
|
11
|
+
MjdlN2UzMDU5NzNmNjA0MDkyZTA0MWIzZWRkMGMzZDk0YzJmOWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzFhNjJhNDI5OTI4NWRmZTU0NjFkYzFlNDZkZTI1MWVkYmIxZDY1YjNlNDk1
|
14
|
+
NDVjNmYyNWZhMmU3Yzc2ZTc1OTRhNTdiOGY1NTg4MmI1OGVlOTZmOWEwZDZk
|
15
|
+
OTM5ODBjZDgwNTI5ZjA4YTM3MDAyYTUyYjQ5Y2VmNjgyOTAwNjg=
|
@@ -36,15 +36,18 @@ module VagrantPlugins
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def execute
|
39
|
-
|
40
|
-
puts "argv: #{argv}"
|
41
|
-
|
42
|
-
self.validate
|
39
|
+
parse_options(@opts)
|
43
40
|
if @options[:help]
|
44
41
|
# Print the help for all the box commands.
|
45
42
|
return help
|
46
43
|
end
|
47
44
|
|
45
|
+
self.validate
|
46
|
+
|
47
|
+
commands.each do |message, command|
|
48
|
+
puts message
|
49
|
+
end
|
50
|
+
|
48
51
|
with_target_vms(nil, single_target: true) do |vm|
|
49
52
|
vm.config.exec.finalize! # TODO: do we have to call it explicitly?
|
50
53
|
|
@@ -60,12 +63,39 @@ module VagrantPlugins
|
|
60
63
|
end
|
61
64
|
end
|
62
65
|
|
66
|
+
def commands
|
67
|
+
server = @options[:server]
|
68
|
+
site = @options[:site]
|
69
|
+
commands = {
|
70
|
+
"downloading files" => "sudo -E rsync --quiet --recursive --compress --times --rsh='ssh -l deploy' spt-#{server}.com:/var/www/deploy/current/sites/#{site}/files/ /var/www/deploy/current/sites/#{site}/files/",
|
71
|
+
"setting file owner" => "sudo chown -R deploy:www-data /var/www/deploy/current/sites/#{site}/files/",
|
72
|
+
"setting file permissions" => "sudo chmod -R 2775 /var/www/deploy/current/sites/#{site}/files/",
|
73
|
+
"dropping database" => "drush @#{site} sql-drop -y && drush cc drush",
|
74
|
+
"downloading database" => "ssh -l deploy spt-#{server}.com drush @#{site} sql-dump | drush @#{site} sql-cli",
|
75
|
+
"updating dabase" => "drush @#{site} updb -y",
|
76
|
+
"turning off css compressing" => "drush @#{site} vset preprocess_css 0 --yes",
|
77
|
+
"turning off js compressing" => "drush @#{site} vset preprocess_js 0 --yes",
|
78
|
+
"turning off block caching" => "drush @#{site} vset block_cache 0 --yes",
|
79
|
+
"turning off page caching" => "drush @#{site} vset cache 0 --yes",
|
80
|
+
"flushing block cache" => "drush @#{site} vset cache_content_flush_cache_block 0 --yes",
|
81
|
+
"flushing page cache" => "drush @#{site} vset cache_content_flush_cache_page 0 --yes",
|
82
|
+
"setting image permissions" => "drush @#{site} vset image_allow_insecure_derivatives 1 --yes",
|
83
|
+
"turning on error reporting" => "drush @#{site} vset error_level 2 --yes",
|
84
|
+
"disabling cdn" => "drush @#{site} dis cdn -y",
|
85
|
+
"disabling constant contact" => "drush @#{site} dis spt_constant_contact -y",
|
86
|
+
"turning on theme_swapper" => "drush @#{site} en theme_swapper -y",
|
87
|
+
"turning on devel" => "drush @#{site} en devel -y",
|
88
|
+
"clearing cache" => "drush @#{site} cc all",
|
89
|
+
}
|
90
|
+
commands
|
91
|
+
end
|
92
|
+
|
63
93
|
def validate
|
64
94
|
if !@servers.include? @options[:server]
|
65
95
|
puts "#{@options[:server]} is not valid server. Pulling from dev."
|
66
96
|
end
|
67
97
|
|
68
|
-
command = "drush @#{@options[:site]} status"
|
98
|
+
command = "drush @#{@options[:site]} status > /dev/null"
|
69
99
|
ssh_opts = { extra_args: ['-q'] } # make it quiet
|
70
100
|
with_target_vms(nil, single_target: true) do |vm|
|
71
101
|
env = vm.action(:ssh_run, ssh_run_command: command, ssh_opts: ssh_opts)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-sptsync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Sehr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|