jetty 9.2.11.v20150529

Closes Homebrew/homebrew#40208.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Dan 2015-05-30 09:07:47 +02:00 committed by Dominyk Tiller
parent d27169f065
commit 63ea5b94be

View file

@ -1,16 +1,18 @@
class Jetty < Formula
homepage "http://www.eclipse.org/jetty/"
url "http://download.eclipse.org/jetty/9.2.10.v20150310/dist/jetty-distribution-9.2.10.v20150310.tar.gz"
version "9.2.10.v20150310"
sha256 "0034587a3dcfdab23fca28291e5e22ae7ff6e80f9f4c7a67f5b2b7777a84b40e"
url "http://download.eclipse.org/jetty/9.2.11.v20150529/dist/jetty-distribution-9.2.11.v20150529.tar.gz"
version "9.2.11.v20150529"
sha256 "2dd7d03d49c44d25a0a852f6f40a8ea5548edd7f1ca33eb7e98386450c4d3ab5"
depends_on :java => "1.7+"
def install
libexec.install Dir['*']
(libexec+'logs').mkpath
libexec.install Dir["*"]
(libexec+"logs").mkpath
bin.mkpath
Dir.glob("#{libexec}/bin/*.sh") do |f|
scriptname = File.basename(f, '.sh')
scriptname = File.basename(f, ".sh")
(bin+scriptname).write <<-EOS.undent
#!/bin/bash
JETTY_HOME=#{libexec}
@ -19,4 +21,16 @@ class Jetty < Formula
chmod 0755, bin+scriptname
end
end
test do
pid = fork { system bin/"jetty", "start" }
sleep 5 # grace time for server start
begin
assert_match /Jetty running pid=\d+/, shell_output("#{bin}/jetty check")
assert_equal "Stopping Jetty: OK\n", shell_output("#{bin}/jetty stop")
ensure
Process.kill 9, pid
Process.wait pid
end
end
end