vagrant-goodhosts 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: 14f2491ca0ba5cd0b97ed3cba9cdb6d0bd53264424bd99e7f332f4f5a5c33478
4
- data.tar.gz: a86835472ca8dedb943669bfbcae46ffd4a98bcbe317fa3e2b7db4ad9ca2dcd8
3
+ metadata.gz: 7d08aeb238e55a6b9c10399ed2bb6cdf227e223bbde08e4a6dfb11366e67e5ee
4
+ data.tar.gz: 59169325206bd3f62a0b040d259fe14dc42dd3fa310822e5bccd4fc04beb15c0
5
5
  SHA512:
6
- metadata.gz: e5b067114de507eca9cce70bfc5e0b04ba9913ec0f864d0e50224d9a2ff55ba4b0a77d6d58e0849901584ef462e62882df37206c6d70c3ca4e9bad036afd3a6f
7
- data.tar.gz: d69cb0b9c0aa641af51cf5c13eb6aa335fa7580e312bfb275286978b32bbed3864a6884d0f88c3bad2e0b773cbaeec80a25ce7d9051ab260544676da69fa3031
6
+ metadata.gz: 4be9ec9e1d21b768de7c7a711f49daebec9606d28bdaf0a897f6deacb45faa76c1c6aec786a1701f119b5e6f4a4152a39315b58bfef77e9fd6dfa14744656519
7
+ data.tar.gz: 2a3e60b74d59745cea020b37dbd946ab0a1a14cbd77041727b20c0f55d9879871704512540578cbe8a247a86d55608c72692b016b061438569d231d4606e14b8
@@ -98,7 +98,11 @@ module VagrantPlugins
98
98
  errorText = ""
99
99
  cli = get_cli
100
100
  hostnames_by_ips = generateHostnamesByIps
101
- hostnames_by_ips.each do |hostnames, ip_address|
101
+ hostnames_by_ips.each do |ip_address, hostnames|
102
+ if ip_address.nil?
103
+ @ui.error "[vagrant-goodhosts] Error adding some hosts, no IP was provided for the following hostnames: #{hostnames}"
104
+ next
105
+ end
102
106
  if cli.include? ".exe"
103
107
  stdin, stdout, stderr, wait_thr = Open3.popen3(cli, "add", ip_address, hostnames)
104
108
  else
@@ -117,8 +121,8 @@ module VagrantPlugins
117
121
  errorText = ""
118
122
  cli = get_cli
119
123
  hostnames_by_ips = generateHostnamesByIps
120
- hostnames_by_ips.each do |hostnames, ip_address|
121
- if !ip_address.nil?
124
+ hostnames_by_ips.each do |ip_address, hostnames|
125
+ if ip_address.nil?
122
126
  @ui.error "[vagrant-goodhosts] Error adding some hosts, no IP was provided for the following hostnames: #{hostnames}"
123
127
  next
124
128
  end
@@ -158,7 +162,7 @@ module VagrantPlugins
158
162
  ip_address = ip
159
163
  hostnames[ip].each do |hostname|
160
164
  if !ip_address.nil?
161
- @ui.info "[vagrant-goodhosts] - removing entry for: #{ip_address} #{hostname}"
165
+ @ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
162
166
  end
163
167
  end
164
168
  hostnames_by_ips = { ip_address => hostnames[ip].join(" ") }
@@ -167,7 +171,7 @@ module VagrantPlugins
167
171
  ip_address = ips[0]
168
172
  hostnames[ip_address].each do |hostname|
169
173
  if !ip_address.nil?
170
- @ui.info "[vagrant-goodhosts] - removing entry for: #{ip_address} #{hostname}"
174
+ @ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
171
175
  end
172
176
  end
173
177
  hostnames_by_ips = { ip_address => hostnames[ip_address].join(" ") }
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module GoodHosts
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniele Scasciafratte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-10 00:00:00.000000000 Z
11
+ date: 2020-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler