vagrant-dns 2.2.0 → 2.2.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: f20a43dd1e1d8a8fd560f86348319ad956f2a28e
4
- data.tar.gz: d3411d5c4f66cadeb93aeec523a834341598a101
3
+ metadata.gz: 55d0e6f7cc3427342989a00be7f483e305bf346e
4
+ data.tar.gz: 5736ee829fe8700bb53645e3ad8449d330277029
5
5
  SHA512:
6
- metadata.gz: d2e561a70c62e88e222b5df72e84256a27552d0200fc6b041cbf634f3d7fd9b765d0d7668f6294c3967a158f44b22cd348d71f4a7ffb4d9f83e36021a9d06fee
7
- data.tar.gz: e7ae3cacb4cbc579b5ddc9f8de00589bba5505d2050b654cf35bffb0763eb0f7a0e57dc5ab1107d40e8a9e0de70fa5fc29d7d4a0e9ec4e8ede58776acb78432e
6
+ metadata.gz: 5135212305291f8c7fc655545ff4dcf76a1f8c040c0aab0d70ee5d090fdee6767a0fb5f71a8391448cb72bad890b75d31840aa6483155e15e84e9b0e4c5bb794
7
+ data.tar.gz: a961387709f85227bcf2792f75c4913ddb666bd1620a6fbeb869ad467ed9edb5c520835ce48e7d01a71cc49c3ba39ac9e58aba77bb23a75417b7a5e1de22d4cb
@@ -1,3 +1,9 @@
1
+ ## 2.2.1
2
+
3
+ ### Fixes:
4
+
5
+ * Prevent action hooks (restarting dns server) from running multiple times [GH-67]
6
+
1
7
  ## 2.2.0
2
8
 
3
9
  ### New Feautres:
data/Gemfile CHANGED
@@ -11,7 +11,7 @@ end
11
11
 
12
12
  group :test, :development do
13
13
  if ENV['TEST_VAGRANT_VERSION'] == 'HEAD'
14
- gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant', :branch => 'master'
14
+ gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant', :branch => 'main'
15
15
  else
16
16
  gem 'vagrant', :git => 'https://github.com/hashicorp/vagrant', :tag => ENV['TEST_VAGRANT_VERSION']
17
17
  end
@@ -19,7 +19,7 @@ group :test, :development do
19
19
  end
20
20
 
21
21
  group :test do
22
- gem 'vagrant-spec', :git => 'https://github.com/hashicorp/vagrant-spec'
22
+ gem 'vagrant-spec', :git => 'https://github.com/hashicorp/vagrant-spec', :branch => 'main'
23
23
  gem 'rake'
24
24
  end
25
25
 
@@ -11,8 +11,22 @@ require "vagrant-dns/middlewares/restart"
11
11
 
12
12
  module VagrantDNS
13
13
 
14
- class Plugin < Vagrant.plugin("2")
14
+ # @private
15
+ def self.hooks
16
+ @hooks ||= []
17
+ end
18
+
19
+ # @private
20
+ def self.hooked(name)
21
+ hooks << name
22
+ end
23
+
24
+ # @private
25
+ def self.hooked?(name)
26
+ hooks.include?(name)
27
+ end
15
28
 
29
+ class Plugin < Vagrant.plugin("2")
16
30
  name "vagrant-dns"
17
31
 
18
32
  config "dns" do
@@ -24,16 +38,22 @@ module VagrantDNS
24
38
  Command
25
39
  end
26
40
 
27
- %w{up reload}.each do |action|
28
- action_hook(:restart_host_dns, "machine_action_#{action}".to_sym) do |hook|
29
- hook.append VagrantDNS::Middlewares::ConfigUp
30
- hook.append VagrantDNS::Middlewares::Restart
41
+ %w{machine_action_up machine_action_reload}.each do |action|
42
+ action_hook("restart_vagarant_dns_on_#{action}", action) do |hook|
43
+ unless VagrantDNS.hooked?(action)
44
+ hook.append VagrantDNS::Middlewares::ConfigUp
45
+ hook.append VagrantDNS::Middlewares::Restart
46
+ VagrantDNS.hooked(action)
47
+ end
31
48
  end
32
49
  end
33
50
 
34
- action_hook(:remove_dns_config, :machine_action_destroy) do |hook|
35
- hook.append VagrantDNS::Middlewares::ConfigDown
36
- hook.append VagrantDNS::Middlewares::Restart
51
+ action_hook("remove_vagrant_dns_config", "machine_action_destroy") do |hook|
52
+ unless VagrantDNS.hooked?("remove_vagrant_dns_config")
53
+ hook.append VagrantDNS::Middlewares::ConfigDown
54
+ hook.append VagrantDNS::Middlewares::Restart
55
+ VagrantDNS.hooked("remove_vagrant_dns_config")
56
+ end
37
57
  end
38
58
  end
39
59
 
@@ -1,3 +1,3 @@
1
1
  module VagrantDNS
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Gilcher
8
8
  - Robert Schulze
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-11-29 00:00:00.000000000 Z
12
+ date: 2021-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: daemons
@@ -102,7 +102,7 @@ homepage: ''
102
102
  licenses:
103
103
  - MIT
104
104
  metadata: {}
105
- post_install_message:
105
+ post_install_message:
106
106
  rdoc_options: []
107
107
  require_paths:
108
108
  - lib
@@ -117,9 +117,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
- rubyforge_project:
121
- rubygems_version: 2.6.14.1
122
- signing_key:
120
+ rubyforge_project:
121
+ rubygems_version: 2.6.14.4
122
+ signing_key:
123
123
  specification_version: 4
124
124
  summary: vagrant-dns manages DNS records of vagrant machines
125
125
  test_files: []