class GrailsAT25 < Formula desc "Web application framework for the Groovy language" homepage "https://grails.org" url "https://github.com/grails/grails-core/releases/download/v2.5.4/grails-2.5.4.zip" sha256 "c1170104156c93be58f737cb1a22ac4e9785ca1fded43c44d9705d20d011df28" bottle :unneeded depends_on :java def install rm_f Dir["bin/*.bat", "bin/cygrails", "*.bat"] prefix.install %w[LICENSE README] libexec.install Dir["*"] bin.mkpath Dir["#{libexec}/bin/*"].each do |f| next unless File.extname(f).empty? ln_s f, bin+File.basename(f) end end test do ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp assert_match "Grails version: #{version}", shell_output("#{bin}/grails --version") end end