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-12-10 21:21:15 +00:00
|
|
|
url "https://github.com/lihaoyi/Ammonite/releases/download/0.8.1/0.8.1", :using => :nounzip
|
|
|
|
sha256 "a1e8561c492baa747ab9aeffc9ea040683ca81a9962735af772d64ec7c019e77"
|
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-12-11 13:42:40 +00:00
|
|
|
depends_on :java => "1.8+"
|
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
|