2011-10-06 19:14:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Calabash < Formula
|
|
|
|
homepage 'http://xmlcalabash.com'
|
2012-02-04 02:55:35 +00:00
|
|
|
url 'http://xmlcalabash.com/download/calabash-1.0.2-94.zip'
|
|
|
|
md5 '76e3c709ce013ab77f5e09bb8a41bd5b'
|
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-01-24 04:23:44 +00:00
|
|
|
system "#{bin}/calabash #{self.prefix}/libexec/xpl/pipe.xpl"
|
2011-10-06 19:14:31 +00:00
|
|
|
end
|
|
|
|
end
|