vagrant-sptsync 0.0.23 → 0.0.24
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 +9 -54
- data/lib/vagrant-sptsync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTBmNDRjNTMxMmFiNDRiYTFlMzFjMjc4OWE1Zjg2ZDUxMTA4MDA4Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzEyZjcwMmVhODhmMTViZDhkYWQ4Y2I5YWQwYjkzN2U0MjMxMGZkZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjhmZGY4NDBlZmU4Mjc0NmRiMWFhYmI2NWU1YWM0YzVmZDY5MDllZmNhOGE2
|
10
|
+
Y2I1NjNjZjIwNDA4ZTRiM2QxMjE5Y2U4NzdjMGQwZTM2NWM3YjQ2ZmRjOWZh
|
11
|
+
OGNmZTAzYzY5ZjI1ODY5MmIzZmIzZWQ4MzhjZTcxOTkzYTkyYjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmVhNGIxNWNlOWY2ZTgzZTYyNzMzMTlkMTQ3ZjcxYjhkZmQyNzljNDgxYThi
|
14
|
+
ZmIzYWMyZDkwZTI0MDZkOWUyY2I2M2VjMzYwZDFlZjkyNzEzZGU4ZDNlZjcy
|
15
|
+
OWZmOTg3YjM2YWRjYTg4OWEzOWY4MjYyYjE5MGU5MDI3ZTQyMTI=
|
@@ -16,7 +16,8 @@ module VagrantPlugins
|
|
16
16
|
opts.separator ""
|
17
17
|
opts.separator "Usage: vagrant sptsync"
|
18
18
|
|
19
|
-
opts.on("-e", "--server [SERVER]", "Specifies the server to pulldown from. Defaults to dev") do |server|
|
19
|
+
opts.on("-e", "--server [SERVER]", [:dev, :qa, :stage], "Specifies the server to pulldown from (dev, qa, stage). Defaults to dev") do |server|
|
20
|
+
puts "server: #{server}"
|
20
21
|
@options[:server] = server
|
21
22
|
end
|
22
23
|
|
@@ -26,49 +27,11 @@ module VagrantPlugins
|
|
26
27
|
end
|
27
28
|
|
28
29
|
opts.on("-h", "--help", "run help") do |site|
|
29
|
-
|
30
|
+
help
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
33
34
|
@servers = ['dev', 'qa', 'stage']
|
34
|
-
|
35
|
-
# options = {}
|
36
|
-
# OptionParser.new do |opts|
|
37
|
-
# opts.banner = "Usage: example.rb [options]"
|
38
|
-
|
39
|
-
# opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
|
40
|
-
# options[:verbose] = v
|
41
|
-
# end
|
42
|
-
# end.parse!
|
43
|
-
|
44
|
-
# p options
|
45
|
-
# p argv
|
46
|
-
|
47
|
-
# super
|
48
|
-
|
49
|
-
# @main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)
|
50
|
-
|
51
|
-
# @subcommands = Vagrant::Registry.new
|
52
|
-
# @subcommands.register(:take) do
|
53
|
-
# require_relative('take')
|
54
|
-
# Take
|
55
|
-
# end
|
56
|
-
# @subcommands.register(:list) do
|
57
|
-
# require_relative('list')
|
58
|
-
# List
|
59
|
-
# end
|
60
|
-
# @subcommands.register(:go) do
|
61
|
-
# require_relative('go')
|
62
|
-
# Go
|
63
|
-
# end
|
64
|
-
# @subcommands.register(:back) do
|
65
|
-
# require_relative('back')
|
66
|
-
# Back
|
67
|
-
# end
|
68
|
-
# @subcommands.register(:delete) do
|
69
|
-
# require_relative('delete')
|
70
|
-
# Delete
|
71
|
-
# end
|
72
35
|
end
|
73
36
|
|
74
37
|
def execute
|
@@ -76,25 +39,17 @@ module VagrantPlugins
|
|
76
39
|
puts "argv: #{argv}"
|
77
40
|
|
78
41
|
self.validate
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
# # If we reached this far then we must have a subcommand. If not,
|
85
|
-
# # then we also just print the help and exit.
|
86
|
-
# command_class = @subcommands.get(@sub_command.to_sym) if @sub_command
|
87
|
-
# return help if !command_class || !@sub_command
|
88
|
-
|
42
|
+
if argv.include?("-h") || argv.include?("--help")
|
43
|
+
# Print the help for all the box commands.
|
44
|
+
return help
|
45
|
+
end
|
89
46
|
|
90
|
-
# # Initialize and execute the command class
|
91
|
-
# command_class.new(@sub_args, @env).execute
|
92
47
|
with_target_vms(nil, single_target: true) do |vm|
|
93
48
|
vm.config.exec.finalize! # TODO: do we have to call it explicitly?
|
94
49
|
|
95
50
|
command = "drush @#{@options[:site]} status"
|
96
51
|
|
97
|
-
ssh_opts = { extra_args: [
|
52
|
+
ssh_opts = { extra_args: [] }
|
98
53
|
|
99
54
|
env = vm.action(:ssh_run, ssh_run_command: command, ssh_opts: ssh_opts)
|
100
55
|
puts env
|
@@ -124,7 +79,7 @@ module VagrantPlugins
|
|
124
79
|
@env.ui.info(@opts.help, :prefix => false)
|
125
80
|
end
|
126
81
|
|
127
|
-
class SiteError < Vagrant::Errors::VagrantError
|
82
|
+
class VagrantPlugins::SPTSync::Command::Root::SiteError < Vagrant::Errors::VagrantError
|
128
83
|
error_key "site_error"
|
129
84
|
|
130
85
|
def initialize(site)
|