vagrant-dns 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/vagrant-dns/version.rb +1 -1
- data/lib/vagrant-dns.rb +18 -27
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 634350bb6858e837967286d76282adba60eae400e80ebf3009cda0a18a317d99
|
4
|
+
data.tar.gz: 3d5a633eb5f9c5ca06248f22f36b8df8d64dba5db1893cde3380bea6aaef6ea5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cec812610ae743d812282ce1b1c58e7d05a04df46c1d3d5bc240a07d1c69ac83b572030e933fddf2d49cc446cf59ac17a561c0b41bcb348f027f238896f407e8
|
7
|
+
data.tar.gz: 31881bf472a679f21b4288890c825de4dc40bf635564f9ec569a1a6fe4c77513ab6f2c83de8c2df74ebf80d85fc8d3d27ceabc4ef70266501ce5773709eb05b1
|
data/CHANGELOG.md
CHANGED
data/lib/vagrant-dns/version.rb
CHANGED
data/lib/vagrant-dns.rb
CHANGED
@@ -12,22 +12,6 @@ require "vagrant-dns/middlewares/config_down"
|
|
12
12
|
require "vagrant-dns/middlewares/restart"
|
13
13
|
|
14
14
|
module VagrantDNS
|
15
|
-
|
16
|
-
# @private
|
17
|
-
def self.hooks
|
18
|
-
@hooks ||= []
|
19
|
-
end
|
20
|
-
|
21
|
-
# @private
|
22
|
-
def self.hooked(name)
|
23
|
-
hooks << name
|
24
|
-
end
|
25
|
-
|
26
|
-
# @private
|
27
|
-
def self.hooked?(name)
|
28
|
-
hooks.include?(name)
|
29
|
-
end
|
30
|
-
|
31
15
|
class Plugin < Vagrant.plugin("2")
|
32
16
|
name "vagrant-dns"
|
33
17
|
|
@@ -41,21 +25,28 @@ module VagrantDNS
|
|
41
25
|
end
|
42
26
|
|
43
27
|
%w{machine_action_up machine_action_reload}.each do |action|
|
44
|
-
action_hook("restart_vagarant_dns_on_#{action}", action) do |hook|
|
45
|
-
|
46
|
-
|
47
|
-
hook.append VagrantDNS::Middlewares::Restart
|
48
|
-
VagrantDNS.hooked(action)
|
49
|
-
end
|
28
|
+
action_hook("restart_vagarant_dns_on_#{action}", action) do |hook, *args|
|
29
|
+
hook_once VagrantDNS::Middlewares::ConfigUp, hook
|
30
|
+
hook_once VagrantDNS::Middlewares::Restart, hook
|
50
31
|
end
|
51
32
|
end
|
52
33
|
|
53
34
|
action_hook("remove_vagrant_dns_config", "machine_action_destroy") do |hook|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
35
|
+
hook_once VagrantDNS::Middlewares::ConfigDown, hook
|
36
|
+
hook_once VagrantDNS::Middlewares::Restart, hook
|
37
|
+
end
|
38
|
+
|
39
|
+
# @private
|
40
|
+
def self.hook_once(middleware, hook)
|
41
|
+
return if hook.append_hooks.any? { |stack_item|
|
42
|
+
if stack_item.is_a?(Array)
|
43
|
+
stack_item.first == middleware
|
44
|
+
else
|
45
|
+
stack_item.middleware == middleware
|
46
|
+
end
|
47
|
+
|
48
|
+
}
|
49
|
+
hook.append middleware
|
59
50
|
end
|
60
51
|
end
|
61
52
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-dns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Gilcher
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-04-
|
12
|
+
date: 2023-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: daemons
|