From 8a1ba25de1a29a47d19aefb65426099108ea3b1c Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Wed, 11 Mar 2015 18:31:26 -0700 Subject: closure-compiler 20150126 Closes #37619. Signed-off-by: Brett Koonce --- Library/Formula/closure-compiler.rb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'Library/Formula') 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 -- cgit v1.2.3