homebrew-core/Formula/ammonite-repl.rb
2017-07-03 05:45:37 -07:00

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/1.0.0/2.12-1.0.0", :using => :nounzip
sha256 "0c5ca294becac79a4c43a8fd77766f6406b724a9ff431dcb55e43dadd458e434"
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