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: dbb951d035fb1ae4e0101196fe520f470a328e5a
4
- data.tar.gz: 2f1b1e9a87828c3a3d04e87b716cf29204c82896
3
+ metadata.gz: dd051c66c3c698629e9eeac65aab7f359e7ee230
4
+ data.tar.gz: e607628cc652b04882a226f7b10def7b32152298
5
5
  SHA512:
6
- metadata.gz: fe416e3190fcefbf46795fa521cd9a04e2d4c536e831d4976e5c43b3a07ca19574452eabf11cd0d7998c1c744c42e3c32da278877942c31669abcdaf9094eaa3
7
- data.tar.gz: feea83ec520f4fa46cbee8048b38ef9ca7ccc97ad1e02571f3ee8729efeaddfc48293be2035a57c4b1c06b943351e931d59d4495d50b1162a0ef632b2f342875
6
+ metadata.gz: 25c8ef756decf39dbce7050799b841e4c4e2aefb4091fd13e12ee221e593efd0434e05e6bfb70b54fc096d473907afe2045d4427960b1878f7f19f2b75fcc1bb
7
+ data.tar.gz: 8cfa604c43f53e037666378517df766b54ba936b9c428ae89e90fa950d3f2729fc66827c2911ed56e9d494e32234587dc09e935d771afff33d01772b4cc74faa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.11.1 (2017-10-04)
4
+
5
+ - Bug fixes
6
+ - The machine of a command alias definition is now correctly preferred over
7
+ the machine of the command definition
8
+
3
9
  ## v0.11.0 (2017-10-02)
4
10
 
5
11
  - Enhancements
@@ -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 = @argv.dup
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
- return argv unless command_alias.argv.is_a?(Array)
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 + command_alias.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)
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  # Defines the current plugin version
3
3
  module DevCommands
4
- VERSION = '0.11.0'.freeze
4
+ VERSION = '0.11.1'.freeze
5
5
  end
6
6
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2017-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls