Skip to content

Commit cb0389d

Browse files
authored
Merge pull request #230107 from Homebrew/somo
somo 1.1.0 (new formula)
2 parents 534e8b2 + b5343fe commit cb0389d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Formula/s/somo.rb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
bottle do
9+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "b74f4079925338ef4ffb144eabac0f44d70f6438ed624e5b26b48d0184cbb20f"
10+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "361ee1f7ea7471cedd15bc41e560bde315a7d3900f671ff87c4515072d240426"
11+
sha256 cellar: :any_skip_relocation, arm64_ventura: "10f3e4c9fde2db017da386b5531e59b9f822b1cfed1ea5fba5e018e45caddba3"
12+
sha256 cellar: :any_skip_relocation, sonoma: "f0bcc7ffd62ef40c29c54be0c4b2d561b53a622bf97210465729fc3db0b8ca12"
13+
sha256 cellar: :any_skip_relocation, ventura: "3fdd3ede9694025e2f26482f85c690b749db5602c6f2559b7fb8db3eb76c59ce"
14+
sha256 cellar: :any_skip_relocation, x86_64_linux: "4a353a71e91ebc13d27f31f624097d4a3b5b38481fe8e8be730cf3ebdfbd1176"
15+
end
16+
17+
depends_on "rust" => :build
18+
19+
def install
20+
system "cargo", "install", *std_cargo_args
21+
end
22+
23+
test do
24+
port = free_port
25+
TCPServer.open("localhost", port) do |_server|
26+
output = JSON.parse(shell_output("#{bin}/somo --json --port #{port}"))
27+
assert_equal port.to_s, output.first["local_port"]
28+
end
29+
end
30+
end

0 commit comments

Comments
 (0)