2011-10-06 19:14:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Calabash < Formula
|
|
|
|
homepage 'http://xmlcalabash.com'
|
2012-08-06 22:08:11 +00:00
|
|
|
url 'http://xmlcalabash.com/download/calabash-1.0.3-94.zip'
|
|
|
|
sha1 '4f8329f2fc9cac1b03f161219a1a1b9987ac7ecf'
|
2011-10-06 19:14:31 +00:00
|
|
|
head 'https://github.com/ndw/xmlcalabash1.git'
|
|
|
|
|
|
|
|
depends_on 'saxon'
|
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install Dir["*"]
|
|
|
|
(bin+'calabash').write shim_script('calabash')
|
|
|
|
end
|
|
|
|
|
|
|
|
def shim_script target
|
|
|
|
<<-EOS.undent
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
java -Xmx1024m -jar #{libexec}/calabash.jar "$@"
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
# This small XML pipeline (*.xpl) that comes with Calabash
|
|
|
|
# is basically its equivalent "Hello World" program.
|
2012-05-06 05:29:57 +00:00
|
|
|
system "#{bin}/calabash", "#{libexec}/xpl/pipe.xpl"
|
2011-10-06 19:14:31 +00:00
|
|
|
end
|
|
|
|
end
|