1c11d0f39b
Closes #7963. Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
28 lines
1.1 KiB
Ruby
28 lines
1.1 KiB
Ruby
class AppEngineJava < Formula
|
|
desc "Google App Engine for Java"
|
|
homepage "https://cloud.google.com/appengine/docs/java/"
|
|
url "https://storage.googleapis.com/appengine-sdks/featured/appengine-java-sdk-1.9.48.zip"
|
|
sha256 "589f1d28e1133a861274f7936b82b4b0156f5001760b3d41884a73a4790de8be"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :java => "1.7+"
|
|
|
|
def install
|
|
rm Dir["bin/*.cmd"]
|
|
libexec.install Dir["*"]
|
|
bin.write_exec_script %w[appcfg.sh dev_appserver.sh endpoints.sh google_sql.sh].map { |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")
|
|
end
|
|
end
|