vagrant-dnsmasq 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: a22f37f14051709fb9d3ff209ba8f7bbf43ddf54
4
- data.tar.gz: 31dde16d265e00a553caeed1a707da3774c82a65
3
+ metadata.gz: a52e299c9c41fd5835db65f40488f9cf2feb795e
4
+ data.tar.gz: cc4a55dd8ecf3acaec6c7feaab3bafa459557e98
5
5
  SHA512:
6
- metadata.gz: 8d31c836656532f3b975976f94f72073be3e2ca72184682375ca11371082e56d2a2b96fac114d61960b84a7e90ee8139348b85474287a5d94e11012fbffa8fe9
7
- data.tar.gz: f218310e2fa580f1789b9208fe8a91a5c1cdfe54279d8d21bf08701a7c138aa5748741f2f70d6b33895e10b734088ff02cdf3fe6d1bef4a97f822497e5d8d430
6
+ metadata.gz: 7870a2826d6bbd88491df62f9d9ae30a00708a32acdb97f4ede5f615c4725e58bf37ad30093e253ced599b5a36d442a4e37c46dde2397c9fb1f9891afe42a941
7
+ data.tar.gz: df6e0b5c5cf3745ef753574562d56128747ced29063043e6ca3f1513923e032320ea04a507bb69fe2ea175df380e393b3fb990cf6a85469289137029a3469fa9
@@ -15,7 +15,7 @@ GIT
15
15
  PATH
16
16
  remote: .
17
17
  specs:
18
- vagrant-dnsmasq (0.0.7)
18
+ vagrant-dnsmasq (0.0.8)
19
19
 
20
20
  GEM
21
21
  remote: https://rubygems.org/
@@ -11,8 +11,10 @@ class DnsmasqConf
11
11
  def self.flush_cache!
12
12
  begin
13
13
  # restart dnsmasq (if installed with homebrew)
14
- system "launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
15
- system "launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
14
+
15
+ puts "You might be asked for your password to restart the dnsmasq daemon."
16
+ system "sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
17
+ system "sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist"
16
18
 
17
19
  # @todo: call proc or try other fancy things to reload dnsmasq
18
20
 
@@ -25,13 +27,12 @@ class DnsmasqConf
25
27
  raise ArgumentError, 'invalid domain instance' unless domain.is_a? Domain
26
28
  raise ArgumentError, 'invalid ip instance' unless ip.is_a? Ip
27
29
 
28
- delete(domain) if includes?(domain)
29
-
30
- File.open(@filename, 'a') { |file|
31
- file.write "\naddress=/#{domain.dotted}/#{ip.v4}"
32
- }
33
-
34
- DnsmasqConf::flush_cache!
30
+ unless includes?(domain)
31
+ File.open(@filename, 'a') { |file|
32
+ file.write "\naddress=/#{domain.dotted}/#{ip.v4}"
33
+ }
34
+ DnsmasqConf::flush_cache!
35
+ end
35
36
  end
36
37
 
37
38
  def includes?(domain)
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Dnsmasq
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-dnsmasq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - mattes