20 lines
641 B
Ruby
20 lines
641 B
Ruby
class AmmoniteRepl < Formula
|
|
desc "Ammonite is a cleanroom re-implementation of the Scala REPL"
|
|
homepage "https://lihaoyi.github.io/Ammonite/#Ammonite-REPL"
|
|
url "https://github.com/lihaoyi/Ammonite/releases/download/0.9.3/2.12-0.9.3", :using => :nounzip
|
|
sha256 "f4ae7873ec6fe222a2b49ab06f0b85f01d3d7d95781631fe2c4f3c8a648bc2e8"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :java => "1.8+"
|
|
|
|
def install
|
|
bin.install Dir["*"].shift => "amm"
|
|
end
|
|
|
|
test do
|
|
ENV["_JAVA_OPTIONS"] = "-Duser.home=#{testpath}"
|
|
output = shell_output("#{bin}/amm -c 'print(\"hello world!\")'")
|
|
assert_equal "hello world!", output.lines.last
|
|
end
|
|
end
|