Last active
September 9, 2024 06:32
-
-
Save huksley/d88da22046c29d34d9193a602e3e6661 to your computer and use it in GitHub Desktop.
Formula to install https://github.com/poundifdef/smoothmq/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Smoothmq < Formula | |
desc "Real-time message queue with persisted topics" | |
homepage "https://github.com/poundifdef/smoothmq" | |
url "https://github.com/poundifdef/smoothmq.git", | |
tag: "v0.2.3", | |
revision: "a023548ff08a8a8fab18b4e1011c81b56288a814" | |
license "MIT" | |
head "https://github.com/poundifdef/smoothmq.git", branch: "main" | |
depends_on "go" => :build | |
def install | |
system "go", "build", *std_go_args(ldflags: "-s -w") | |
end | |
test do | |
port = free_port | |
pid = fork do | |
exec bin/"smoothmq", "server", "--dashboard-port", port.to_s | |
end | |
sleep 1 | |
output = shell_output("curl -sS http://localhost:#{port}") | |
assert_match "OK", output | |
Process.kill("TERM", pid) | |
Process.wait(pid) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment