diff options
Diffstat (limited to 'Library/Formula/closure-compiler.rb')
| -rw-r--r-- | Library/Formula/closure-compiler.rb | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/Library/Formula/closure-compiler.rb b/Library/Formula/closure-compiler.rb index e582632c3..92e52469c 100644 --- a/Library/Formula/closure-compiler.rb +++ b/Library/Formula/closure-compiler.rb @@ -1,9 +1,7 @@ -require "formula" - class ClosureCompiler < Formula homepage "https://github.com/google/closure-compiler" - url "https://github.com/google/closure-compiler/archive/maven-release-v20141023.tar.gz" - sha1 "4551a74f0ccfd7e1de325d495b5f71f71a3b24c8" + url "https://github.com/google/closure-compiler/archive/maven-release-v20150126.tar.gz" + sha256 "cedd1746f2e47bad781aaba9c80e5409906d09af309f05c03832dea05497e375" head "https://github.com/google/closure-compiler.git" @@ -15,7 +13,7 @@ class ClosureCompiler < Formula end depends_on :ant => :build - depends_on :java => "1.7" + depends_on :java => "1.7+" def install system "ant", "clean" @@ -24,4 +22,17 @@ class ClosureCompiler < Formula libexec.install Dir["*"] bin.write_jar_script libexec/"build/compiler.jar", "closure-compiler" end + + test do + (testpath/"test.js").write <<-EOS.undent + (function(){ + var t = true; + return t; + })(); + EOS + system bin/"closure-compiler", + "--js", testpath/"test.js", + "--js_output_file", testpath/"out.js" + assert_equal (testpath/"out.js").read.chomp, "(function(){return!0})();" + end end |
