Skip to content

Commit f6cd222

Browse files
committed
somo 1.1.0 (new formula)
Somo is a human-friendly alternative to netstat for socket and port monitoring.
1 parent 5124293 commit f6cd222

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Formula/s/somo.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class Somo < Formula
2+
desc "Human-friendly alternative to netstat for socket and port monitoring"
3+
homepage "https://github.com/theopfr/somo"
4+
url "https://github.com/theopfr/somo/archive/refs/tags/v1.1.0.tar.gz"
5+
sha256 "8026a39058a0e71cc603cd887b4fd5c0eb8ff310fb5ee1a36ff98ebe90be5878"
6+
license "MIT"
7+
8+
depends_on "rust" => :build
9+
10+
def install
11+
system "cargo", "install", *std_cargo_args
12+
end
13+
14+
test do
15+
port = free_port
16+
TCPServer.open("localhost", port) do |_server|
17+
output = JSON.parse(shell_output("#{bin}/somo --json --port #{port}"))
18+
assert_equal port.to_s, output.first["local_port"]
19+
end
20+
end
21+
end

0 commit comments

Comments
 (0)