vagrant-goodhosts 1.0.15 → 1.0.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6843d62e56a2bd4b265a0b4854bcb69fba17c99b60515ad4bdb23ef1decf384b
|
4
|
+
data.tar.gz: dfb62145d87e3d1d3122a6777399d3fb41c620df68f762ed6284c3221066e72b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9476f2832c25de5c268f2bcbda6f243f784ed641143c8a5b26fd0511582e9cbd010ff99faa96f53084699c16970a9efb71964309914f4d4e4847dacae2392346
|
7
|
+
data.tar.gz: 583d8ccf7c2c5e77feed7980987facb0fe156e1325efd580d19c20518cea2141a4b80e6cb18d8f15a550f945099c9c37755c13dc703d44e72c60b14c30e75104
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ You currently only need the `hostname` and a `:private_network` network with a f
|
|
30
30
|
|
31
31
|
```ruby
|
32
32
|
config.vm.network :private_network, ip: "192.168.3.10"
|
33
|
-
config.vm.hostname = "www.testing.de"
|
33
|
+
config.vm.hostname = "www.testing.de" # This is not used by the plugin
|
34
34
|
config.goodhosts.aliases = ["alias.testing.de", "alias2.somedomain.com"]
|
35
35
|
```
|
36
36
|
|
@@ -26,9 +26,10 @@ module VagrantPlugins
|
|
26
26
|
# machines and having a static flag will result in a plugin being
|
27
27
|
# executed just once.
|
28
28
|
# https://github.com/goodhosts/vagrant/issues/30
|
29
|
-
|
29
|
+
@@completed[@machine.name] = [] unless @@completed.key?(@machine.name)
|
30
|
+
unless @@completed[@machine.name].include? self.class.name
|
30
31
|
run(env)
|
31
|
-
@@completed[@machine.name]
|
32
|
+
@@completed[@machine.name] << self.class.name
|
32
33
|
end
|
33
34
|
|
34
35
|
@app.call(env)
|
@@ -5,15 +5,15 @@ module VagrantPlugins
|
|
5
5
|
|
6
6
|
def run(env)
|
7
7
|
machine_action = env[:machine_action]
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
|
9
|
+
return unless @machine.id
|
10
|
+
return unless [:destroy, :halt, :suspend].include? machine_action
|
11
|
+
|
12
|
+
if ([:halt, :suspend].include? machine_action) && (false == @machine.config.goodhosts.remove_on_suspend)
|
13
|
+
@ui.info "[vagrant-goodhosts] Removing hosts on suspend disabled"
|
14
|
+
else
|
15
|
+
@ui.info "[vagrant-goodhosts] Removing hosts"
|
16
|
+
removeHostEntries
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -184,7 +184,7 @@ module VagrantPlugins
|
|
184
184
|
if ips.count() > 1
|
185
185
|
ips.each do |ip|
|
186
186
|
ip_address = ip
|
187
|
-
if hostnames[ip].count() >
|
187
|
+
if hostnames[ip].count() > 0
|
188
188
|
hostnames[ip].each do |hostname|
|
189
189
|
if !ip_address.nil?
|
190
190
|
@ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
|
@@ -195,7 +195,7 @@ module VagrantPlugins
|
|
195
195
|
end
|
196
196
|
else
|
197
197
|
ip_address = ips[0]
|
198
|
-
if hostnames[ip_address].count() >
|
198
|
+
if hostnames[ip_address].count() > 0
|
199
199
|
hostnames[ip_address].each do |hostname|
|
200
200
|
if !ip_address.nil?
|
201
201
|
@ui.info "[vagrant-goodhosts] - found entry for: #{ip_address} #{hostname}"
|
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.
|
4
|
+
version: 1.0.16
|
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-
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|