vagrant-devcommands 0.11.0 → 0.11.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd051c66c3c698629e9eeac65aab7f359e7ee230
|
4
|
+
data.tar.gz: e607628cc652b04882a226f7b10def7b32152298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25c8ef756decf39dbce7050799b841e4c4e2aefb4091fd13e12ee221e593efd0434e05e6bfb70b54fc096d473907afe2045d4427960b1878f7f19f2b75fcc1bb
|
7
|
+
data.tar.gz: 8cfa604c43f53e037666378517df766b54ba936b9c428ae89e90fa950d3f2729fc66827c2911ed56e9d494e32234587dc09e935d771afff33d01772b4cc74faa
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,8 @@ module VagrantPlugins
|
|
9
9
|
|
10
10
|
attr_reader :argv
|
11
11
|
attr_reader :command
|
12
|
+
|
13
|
+
attr_reader :machine
|
12
14
|
attr_reader :desc
|
13
15
|
attr_reader :help
|
14
16
|
attr_reader :usage
|
@@ -18,6 +20,8 @@ module VagrantPlugins
|
|
18
20
|
|
19
21
|
@argv = spec[:argv] || []
|
20
22
|
@command = spec[:command]
|
23
|
+
|
24
|
+
@machine = spec[:machine]
|
21
25
|
@desc = spec[:desc]
|
22
26
|
@help = spec[:help]
|
23
27
|
@usage = spec[:usage]
|
@@ -22,15 +22,28 @@ module VagrantPlugins
|
|
22
22
|
private
|
23
23
|
|
24
24
|
def argv_for(command_alias)
|
25
|
-
argv
|
25
|
+
argv = @argv.dup
|
26
|
+
argv = patch_machine(argv, command_alias)
|
27
|
+
argv = patch_command(argv, command_alias)
|
28
|
+
|
29
|
+
return argv unless command_alias.argv.is_a?(Array)
|
30
|
+
|
31
|
+
argv + command_alias.argv
|
32
|
+
end
|
33
|
+
|
34
|
+
def patch_command(argv, command_alias)
|
26
35
|
index = 0
|
27
36
|
index = 1 if UTIL.machine_name?(argv[0].to_s, @env.machine_index)
|
28
37
|
|
29
38
|
argv[index] = command_alias.command
|
39
|
+
argv
|
40
|
+
end
|
30
41
|
|
31
|
-
|
42
|
+
def patch_machine(argv, command_alias)
|
43
|
+
return argv if UTIL.machine_name?(argv[0].to_s, @env.machine_index)
|
32
44
|
|
33
|
-
argv
|
45
|
+
argv.unshift(command_alias.machine) if command_alias.machine
|
46
|
+
argv
|
34
47
|
end
|
35
48
|
|
36
49
|
def runnable_for(command_alias)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-devcommands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Neudert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|