vagrant-hostsupdater 1.2.3 → 1.2.4

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: 0371cf411522954cf291b4e87ed341c14d6b8cb21cc94f4cc03986adc5ad803a
4
- data.tar.gz: 5af3574a4307a52e64754b8c9b370be54f7336ad7b31154cdcb88f07987b1b31
3
+ metadata.gz: 8fa0669f6bc99a98b0182d0daeb88f22f35987827d604cdac71402a67ebd3fbe
4
+ data.tar.gz: 0bc5cefa703b1fef67d9f07f06b5fb9bc64c5e7ce90267f8ee25881967d3cbbc
5
5
  SHA512:
6
- metadata.gz: 178761d6c30e2c1f24d904583deea679b55d0761b17e2a3f59545e7982289faf51290cc167795758868cda17302eacf76452eecb61766072710f90c3d276ad4c
7
- data.tar.gz: f86f197b4c899f45d9de3b20abf6d2d03d01c62d30e9b5c0c961664434f5dfacd9bf468cfab96fa9a044395b763a7f452e2b6cbb922ef507916c887037e6efc6
6
+ metadata.gz: 74abfa02f179167a588d63892c6e9c47e067c5c19f8a39d2f22ce652bd8cf35f17f17d9585f764c53e4c2c37cae9f4ae52d58f65a9f6d0a24ce9ec01f2819597
7
+ data.tar.gz: 46d6b9bc921ffb0005aa88eae4a6299d9322ad079372e1a1335548324e23d9799b79e2784f7929632e31fcf66ea953517496821b51ba5f9d363f7b30ebcf2c87
@@ -26,9 +26,9 @@ 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/agiledivider/vagrant-hostsupdater/issues/198
29
- if not @@completed.key?(@machine.name)
29
+ if @machine.id and not @@completed.key?("#{self.class.name}-#{@machine.name}")
30
30
  run(env)
31
- @@completed[@machine.name] = true
31
+ @@completed["#{self.class.name}-#{@machine.name}"] = true
32
32
  end
33
33
 
34
34
  @app.call(env)
@@ -5,15 +5,16 @@ module VagrantPlugins
5
5
 
6
6
  def run(env)
7
7
  machine_action = env[:machine_action]
8
- if machine_action != :destroy || !@machine.id
9
- if machine_action != :suspend || false != @machine.config.hostsupdater.remove_on_suspend
10
- if machine_action != :halt || false != @machine.config.hostsupdater.remove_on_suspend
11
- @ui.info "[vagrant-hostsupdater] Removing hosts"
12
- removeHostEntries
13
- else
14
- @ui.info "[vagrant-hostsupdater] Removing hosts on suspend disabled"
15
- end
8
+ if [:suspend, :halt].include? machine_action
9
+ if @machine.config.hostsupdater.remove_on_suspend == false
10
+ @ui.info "[vagrant-hostsupdater] Not removing hosts (remove_on_suspend false)"
11
+ else
12
+ @ui.info "[vagrant-hostsupdater] Removing hosts on suspend"
13
+ removeHostEntries
16
14
  end
15
+ else
16
+ @ui.info "[vagrant-hostsupdater] Removing hosts"
17
+ removeHostEntries
17
18
  end
18
19
  end
19
20
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostsUpdater
3
- VERSION = '1.2.3'
3
+ VERSION = '1.2.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-hostsupdater
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Falk Kühnel