We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5124293 commit f6cd222Copy full SHA for f6cd222
Formula/s/somo.rb
@@ -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
20
21
+end
0 commit comments