aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Dunn2015-03-11 18:31:26 -0700
committerBrett Koonce2015-03-11 23:48:24 -0700
commit8a1ba25de1a29a47d19aefb65426099108ea3b1c (patch)
tree3552afff57af5a1000edf5bf541883e04c7c7420
parent7cad1e4930849c126010b6b4681ea60f62f83f8d (diff)
downloadhomebrew-8a1ba25de1a29a47d19aefb65426099108ea3b1c.tar.bz2
closure-compiler 20150126
Closes #37619. Signed-off-by: Brett Koonce <koonce@gmail.com>
-rw-r--r--Library/Formula/closure-compiler.rb21
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