vagrant-dnsmasq 0.0.7 → 0.0.8
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/vagrant-dnsmasq/includes/DnsmasqConf.class.rb +10 -9
- data/lib/vagrant-dnsmasq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a52e299c9c41fd5835db65f40488f9cf2feb795e
|
|
4
|
+
data.tar.gz: cc4a55dd8ecf3acaec6c7feaab3bafa459557e98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7870a2826d6bbd88491df62f9d9ae30a00708a32acdb97f4ede5f615c4725e58bf37ad30093e253ced599b5a36d442a4e37c46dde2397c9fb1f9891afe42a941
|
|
7
|
+
data.tar.gz: df6e0b5c5cf3745ef753574562d56128747ced29063043e6ca3f1513923e032320ea04a507bb69fe2ea175df380e393b3fb990cf6a85469289137029a3469fa9
|
data/Gemfile.lock
CHANGED
|
@@ -11,8 +11,10 @@ class DnsmasqConf
|
|
|
11
11
|
def self.flush_cache!
|
|
12
12
|
begin
|
|
13
13
|
# restart dnsmasq (if installed with homebrew)
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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)
|