homebrew-core/Formula/serveit.rb
Gary Bernhardt 4083f5caac
serveit 0.0.3
Closes #37835.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
2019-03-13 11:26:21 +08:00

25 lines
652 B
Ruby

class Serveit < Formula
desc "Synchronous server and rebuilder of static content"
homepage "https://github.com/garybernhardt/serveit"
url "https://github.com/garybernhardt/serveit/archive/v0.0.3.tar.gz"
sha256 "5bbefdca878aab4a8c8a0c874c02a0a033cf4321121c9e006cb333d9bd7b6d52"
revision 1
head "https://github.com/garybernhardt/serveit.git"
bottle :unneeded
def install
bin.install "serveit"
end
test do
begin
pid = fork { exec bin/"serveit" }
sleep 2
assert_match(/Listing for/, shell_output("curl localhost:8000"))
ensure
Process.kill("SIGINT", pid)
Process.wait(pid)
end
end
end