2015-08-13 09:59:59 +00:00
|
|
|
class AppEngineJava < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Google App Engine for Java"
|
2016-07-03 12:14:31 +00:00
|
|
|
homepage "https://cloud.google.com/appengine/docs/java/"
|
|
|
|
url "https://storage.googleapis.com/appengine-sdks/featured/appengine-java-sdk-1.9.42.zip"
|
|
|
|
sha256 "3003892e89fb32a51dc3e2d91658fc7ba8b31f8b0b3fc22ccbd856ed94a03424"
|
2010-05-05 18:48:56 +00:00
|
|
|
|
2015-10-22 13:05:08 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :java => "1.7+"
|
2016-07-03 12:14:31 +00:00
|
|
|
|
2009-09-18 21:43:20 +00:00
|
|
|
def install
|
2014-06-10 21:53:50 +00:00
|
|
|
rm Dir["bin/*.cmd"]
|
|
|
|
libexec.install Dir["*"]
|
2016-07-03 12:14:31 +00:00
|
|
|
bin.write_exec_script %w[appcfg.sh dev_appserver.sh endpoints.sh google_sql.sh].each { |fn| libexec/"bin/#{fn}" }
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"WEB-INF/web.xml").write "<web-app/>"
|
|
|
|
(testpath/"WEB-INF/appengine-web.xml").write "<appengine-web-app><threadsafe>true</threadsafe></appengine-web-app>"
|
|
|
|
Process.setsid
|
|
|
|
IO.popen("#{bin}/dev_appserver.sh . 2>&1") do |io|
|
|
|
|
assert_not_nil(io.gets, "Dev App Server terminated prematurely") until $_ == "INFO: Dev App Server is now running\n"
|
|
|
|
Signal.trap "INT", "IGNORE"
|
|
|
|
Process.kill "INT", 0
|
|
|
|
end
|
|
|
|
assert_equal(130, $?.exitstatus, "Dev App Server exited with unexpected status code")
|
2009-09-18 21:43:20 +00:00
|
|
|
end
|
|
|
|
end
|