aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-S. Porst2014-03-22 19:01:44 +0100
committerAdam Vandenberg2014-03-24 06:20:52 -0700
commit25f0a7b91c9eecec9da08704781e893a1bfe7a52 (patch)
tree2063638496a9e5093bb16e3935a30eae8596d9ff
parent12c2b5fb4dc183b0bb38ae5470a377f3452b1737 (diff)
downloadhomebrew-25f0a7b91c9eecec9da08704781e893a1bfe7a52.tar.bz2
metaproxy 1.4.6
* Update URL and checksum * use " instead of ' * add a test * split command arguments * use »EOS« instead of »TEST_CONFIG« * remove newline Closes #27783. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/metaproxy.rb43
1 files changed, 35 insertions, 8 deletions
diff --git a/Library/Formula/metaproxy.rb b/Library/Formula/metaproxy.rb
index e65aec012..2ae7403aa 100644
--- a/Library/Formula/metaproxy.rb
+++ b/Library/Formula/metaproxy.rb
@@ -1,17 +1,44 @@
-require 'formula'
+require "formula"
class Metaproxy < Formula
- homepage 'http://www.indexdata.com/metaproxy'
- url 'http://ftp.indexdata.dk/pub/metaproxy/metaproxy-1.4.5.tar.gz'
- sha1 'f92002d6e713e9ad13fd526b4e4f49d349f9389a'
+ homepage "http://www.indexdata.com/metaproxy"
+ url "http://ftp.indexdata.dk/pub/metaproxy/metaproxy-1.4.6.tar.gz"
+ sha1 "bb36efb7d2f2d16aec1ee9c62dda10e6e3c4b995"
- depends_on 'pkg-config' => :build
- depends_on 'yazpp'
- depends_on 'boost'
+ depends_on "pkg-config" => :build
+ depends_on "yazpp"
+ depends_on "boost"
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
- system "make install"
+ system "make", "install"
end
+
+ # Test by making metaproxy test a trivial configuration file (etc/config0.xml).
+ test do
+ (testpath/"test-config.xml").write <<-EOS.undent
+ <?xml version="1.0"?>
+ <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
+ <start route="start"/>
+ <filters>
+ <filter id="frontend" type="frontend_net">
+ <port max_recv_bytes="1000000">@:9070</port>
+ <message>FN</message>
+ <stat-req>/fn_stat</stat-req>
+ </filter>
+ </filters>
+ <routes>
+ <route id="start">
+ <filter refid="frontend"/>
+ <filter type="log"><category access="false" line="true" apdu="true" /></filter>
+ <filter type="backend_test"/>
+ <filter type="bounce"/>
+ </route>
+ </routes>
+ </metaproxy>
+ EOS
+
+ system "#{bin}/metaproxy", "-t", "--config", "#{testpath}/test-config.xml"
+ end
end