2015-10-20 20:48:22 +00:00
|
|
|
class AmmoniteRepl < Formula
|
|
|
|
desc "Ammonite is a cleanroom re-implementation of the Scala REPL"
|
|
|
|
homepage "https://lihaoyi.github.io/Ammonite/#Ammonite-REPL"
|
2016-10-08 09:09:07 +00:00
|
|
|
url "https://github.com/lihaoyi/Ammonite/releases/download/0.7.8/0.7.8", :using => :nounzip
|
|
|
|
sha256 "776e3128f7648ea23c36900349a427c5e492d6f3aaae1c8c8c8715884cb86468"
|
2015-10-20 20:48:22 +00:00
|
|
|
|
2016-04-05 07:59:37 +00:00
|
|
|
bottle :unneeded
|
2015-11-08 14:33:44 +00:00
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :java => "1.7+"
|
2015-10-20 20:48:22 +00:00
|
|
|
|
|
|
|
def install
|
2016-07-24 13:14:17 +00:00
|
|
|
bin.install Dir["*"].shift => "amm"
|
2015-10-20 20:48:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-09-03 04:51:06 +00:00
|
|
|
ENV["_JAVA_OPTIONS"] = "-Duser.home=#{testpath}"
|
2016-07-24 13:14:17 +00:00
|
|
|
output = shell_output("#{bin}/amm -c 'print(\"hello world!\")'")
|
2016-09-03 04:51:06 +00:00
|
|
|
assert_equal "hello world!", output.lines.last
|
2015-10-20 20:48:22 +00:00
|
|
|
end
|
|
|
|
end
|