aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-01-08 13:49:31 +0800
committerMike McQuaid2015-01-08 18:27:03 +0000
commit0eadb9791d29c84cc822a7d5017d3ddb0fad45db (patch)
tree1521a94893c600cffe67f90688f6ce50ba2f4b5a /Library
parent13b4fba0caa7105d136044823cd022011d9eaf98 (diff)
downloadhomebrew-0eadb9791d29c84cc822a7d5017d3ddb0fad45db.tar.bz2
dnscrypt-proxy: modernize and add test
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/dnscrypt-proxy.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Formula/dnscrypt-proxy.rb b/Library/Formula/dnscrypt-proxy.rb
index e33647a22..7a08b8023 100644
--- a/Library/Formula/dnscrypt-proxy.rb
+++ b/Library/Formula/dnscrypt-proxy.rb
@@ -1,5 +1,3 @@
-require "formula"
-
class DnscryptProxy < Formula
homepage "http://dnscrypt.org"
url "https://github.com/jedisct1/dnscrypt-proxy/releases/download/1.4.2/dnscrypt-proxy-1.4.2.tar.bz2"
@@ -20,7 +18,8 @@ class DnscryptProxy < Formula
depends_on "libtool" => :build
end
- option "plugins", "Support plugins and install example plugins."
+ option "with-plugins", "Support plugins and install example plugins."
+ deprecated_option "plugins" => "with-plugins"
depends_on "libsodium"
@@ -28,7 +27,7 @@ class DnscryptProxy < Formula
system "autoreconf", "-if" if build.head?
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
- if build.include? "plugins"
+ if build.with? "plugins"
args << "--enable-plugins"
args << "--enable-relaxed-plugins-permissions"
args << "--enable-plugins-root"
@@ -94,4 +93,8 @@ class DnscryptProxy < Formula
</plist>
EOS
end
+
+ test do
+ system "#{bin}/hostip", "-r", "8.8.8.8", "www.google.com"
+ end
end