Skip to content

Instantly share code, notes, and snippets.

@huksley
Last active September 9, 2024 06:32
Show Gist options
  • Save huksley/d88da22046c29d34d9193a602e3e6661 to your computer and use it in GitHub Desktop.
Save huksley/d88da22046c29d34d9193a602e3e6661 to your computer and use it in GitHub Desktop.
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