Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

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

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
jawshooah authored and MikeMcQuaid committed Apr 20, 2015
1 parent e064963 commit d444255
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Library/Formula/scalariform.rb
@@ -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 d444255

Please sign in to comment.