Skip to content

Commit

Permalink
scalariform 0.1.6 (new formula)
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#38688.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
jawshooah authored and MikeMcQuaid committed Apr 20, 2015
1 parent 4cf06fe commit 1054ad6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Formula/scalariform.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
class Scalariform < Formula
homepage "https://github.com/daniel-trinh/scalariform"
url "https://github.com/daniel-trinh/scalariform/releases/download/0.1.6/scalariform.jar"
sha256 "346276c5f3a25a44d64ed38f43739813933487299a651f7c64db748427641c54"

def install
libexec.install "scalariform.jar"
bin.write_jar_script libexec/"scalariform.jar", "scalariform"
end

test do
before_data = <<-EOS.undent
def foo() {
println("Hello World")
}
EOS

after_data = <<-EOS.undent
def foo() {
println("Hello World")
}
EOS

(testpath/"foo.scala").write before_data
system bin/"scalariform", "-indentSpaces=3", testpath/"foo.scala"
assert_equal after_data, (testpath/"foo.scala").read
end
end

0 comments on commit 1054ad6

Please sign in to comment.