21 lines
640 B
Ruby
21 lines
640 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.6.4/2.12-1.6.4"
|
|
sha256 "82d5a3319d6469609d5197b2bebd62c859b1aa21976623fc96a4564ed210bd9a"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :java => "1.8+"
|
|
|
|
def install
|
|
libexec.install Dir["*"].shift => "amm"
|
|
chmod 0555, libexec/"amm"
|
|
bin.install_symlink libexec/"amm"
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{bin}/amm -c 'print(\"hello world!\")'")
|
|
assert_equal "hello world!", output.lines.last
|
|
end
|
|
end
|