forked from VirtusLab/homebrew-scala-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscala-cli.rb
25 lines (22 loc) · 834 Bytes
/
scala-cli.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# typed: false
# frozen_string_literal: true
# ScalaCli Formula
class ScalaCli < Formula
desc "Launcher for ScalaCli"
homepage "https://virtuslab.github.io/scala-cli/"
url "https://github.com/Virtuslab/scala-cli/releases/download/v0.1.16/scala-cli-x86_64-apple-darwin.gz"
version "0.1.16"
sha256 "22fddca9d13717ec39d33db51db07aa621b4179f09db744a9ebe2240194bdded"
license "Apache-2.0"
def install
bin.install "scala-cli-x86_64-apple-darwin" => "scala-cli"
end
test do
(testpath / "Hello.scala").write "object Hello {
def main(args: Array[String]): Unit =
println(\"Hello from Scala\")
}"
output = shell_output("#{bin}/scala-cli Hello.scala")
assert_equal ["Hello from Scala\n"], output.lines
end
end