vagrant-goodhosts 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9078c31120178731d174a2aa15a12b957d3057e11816127c0f89a319c1c6a400
4
- data.tar.gz: f6fb7224ef9ee4eca57a100eb8cafde6ef684eae61fa9aadbc1160554c6d36f1
3
+ metadata.gz: 7318e82f1a00cbc634eb59ada30fc0dac4faaec430d03cf14a18cbbab3ad47ca
4
+ data.tar.gz: b803523ef62f3678f41d326c274b797a45fac3506965c4b3faf35f2a5d6e80dd
5
5
  SHA512:
6
- metadata.gz: 0456d61e925bbf2dbc232c4adbc3767c36722fd1f4708283201c9a654b5d972828b4cfb8c550d41b937da3fc960243f59d7e9bda8c8b4d5f8365aa1cad1db158
7
- data.tar.gz: 91abd5a594aa8b79a605f9841725f394511907a477bf879a11cb5331d6ded560854cace147e21797c0350afed9aa44a80bae924c4caffc29a161c801b9ae2601
6
+ metadata.gz: 853bc371c5cb4b11ee893c4c9d36a16f8b23a304e1b96622eb4d92798d4aeca37c1fa8e9d9888706f336613cd2b4871d2afa338ee38f07dc6e793358195e7e40
7
+ data.tar.gz: 71c07e6cb107e9bb4f28f22169deb39ae0b8656c242cb3fa559375f6f35f04ceff66f37ee978957afc248b2bb1470d9244d64fca96a12647e6a2240275759c31
@@ -21,9 +21,14 @@ module VagrantPlugins
21
21
  end
22
22
 
23
23
  def call(env)
24
- if not @@completed.key?(self.class.name)
24
+ # Check whether the plugin has been executed for a particular
25
+ # VM as it may happen that a single Vagrantfile defines multiple
26
+ # machines and having a static flag will result in a plugin being
27
+ # executed just once.
28
+ # https://github.com/goodhosts/vagrant/issues/30
29
+ if not @@completed.key?(@machine.name)
25
30
  run(env)
26
- @@completed[self.class.name] = true
31
+ @@completed[@machine.name] = true
27
32
  end
28
33
 
29
34
  @app.call(env)
@@ -7,6 +7,11 @@ module VagrantPlugins
7
7
  def getIps
8
8
  ips = []
9
9
 
10
+ if @machine.config.vm.networks.length == 0
11
+ @ui.error("[vagrant-goodhosts] No ip address found for this virtual machine")
12
+ exit
13
+ end
14
+
10
15
  @machine.config.vm.networks.each do |network|
11
16
  key, options = network[0], network[1]
12
17
  ip = options[:ip] if (key == :private_network || key == :public_network) && options[:goodhosts] != "skip"
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GoodHosts
3
- VERSION = '1.0.13'
3
+ VERSION = '1.0.14'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-goodhosts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniele Scasciafratte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler