diff options
| author | Adam Vandenberg | 2014-05-17 13:04:02 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-05-17 13:04:02 -0700 |
| commit | 4246a45c6cf911aa70cf14eb869146b190523115 (patch) | |
| tree | 1055e3fd93a6dcedbcd18cbf946e8f10eeac8a4c /Library/Formula | |
| parent | 6b9b409adc5f89931e66dcebfbc38eac9ed7116a (diff) | |
| download | homebrew-4246a45c6cf911aa70cf14eb869146b190523115.tar.bz2 | |
gant 1.9.11 (groovy 2.3.0)
Fixes #26717.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/gant.rb | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/Library/Formula/gant.rb b/Library/Formula/gant.rb index f3095c710..a69c5e3a5 100644 --- a/Library/Formula/gant.rb +++ b/Library/Formula/gant.rb @@ -1,17 +1,45 @@ -require 'formula' +require "formula" class Gant < Formula - homepage 'http://gant.codehaus.org/' - url 'http://dist.codehaus.org/gant/distributions/gant-1.9.10-_groovy-2.2.0.zip' - version '1.9.10' - sha1 '90095416f659b626863b38acd4ca83d2ff65285a' + homepage "http://gant.codehaus.org/" + url "http://dist.codehaus.org/gant/distributions/gant-1.9.11-_groovy-2.3.0.zip" + version "1.9.11" + sha1 "5601db2f5001de16b856330abec7b58e1fbf4779" - depends_on 'groovy' + depends_on "groovy" def install rm_f Dir["bin/*.bat"] # gant-starter.conf is found relative to bin libexec.install %w[bin lib conf] - bin.install_symlink "#{libexec}/bin/gant" + + ENV["GANT_HOME"] = libexec + bin.install libexec/"bin/gant" + bin.env_script_all_files(libexec+"bin", :GANT_HOME => ENV["GANT_HOME"]) + end + + test do + (testpath/"build.gant").write <<-EOS.undent + includeTargets << gant.targets.Clean + cleanPattern << ['**/*~', '**/*.bak'] + cleanDirectory << 'build' + + target(stuff: 'A target to do some stuff.') { + println 'Stuff' + depends clean + echo message: 'A default message from Ant.' + otherStuff() + } + + target(otherStuff: 'A target to do some other stuff') { + println 'OtherStuff' + echo message: 'Another message from Ant.' + clean() + } + + setDefaultTarget stuff + EOS + output = `#{bin}/gant`.strip + assert_match /BUILD SUCCESSFUL/, output end end |
