add dsflushcache for OSX
This commit is contained in:
parent
6f2354b9bf
commit
481c7f9e0d
|
@ -25,6 +25,7 @@ class Noprocast
|
|||
File.open("/etc/hosts", 'a') do |file|
|
||||
file << "\n\n# noprocast start\n#{current_hosts.map { |host| "127.0.0.1 #{host}" }.join("\n")}\n# noprocast end"
|
||||
end
|
||||
system "dscacheutil -flushcache" # only for OSX >= 10.5: flush the DNS cache
|
||||
end
|
||||
|
||||
def deactivate!
|
||||
|
@ -57,6 +58,7 @@ class Noprocast
|
|||
end
|
||||
|
||||
def edit!
|
||||
setup_deny_file_if_required!
|
||||
editor = ENV['EDITOR'] || 'vi'
|
||||
system "#{editor} #{deny_file_path}"
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{noprocast}
|
||||
s.version = "0.1.2"
|
||||
s.version = "0.1.3"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Rob Watson"]
|
||||
|
|
Loading…
Reference in New Issue