Skip to content

Commit 900a446

Browse files
authored
Merge pull request Homebrew#191593 from ivaquero/wthrr-1.2.0-(new-formula)
wthrr 1.2.0 (new formula)
2 parents 14a3865 + 616b54f commit 900a446

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Formula/w/wthrr.rb

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
class Wthrr < Formula
2+
desc "Weather Companion for the Terminal"
3+
homepage "https://github.com/ttytm/wthrr-the-weathercrab"
4+
url "https://github.com/ttytm/wthrr-the-weathercrab/archive/refs/tags/v1.2.0.tar.gz"
5+
sha256 "6dbad5cf37fc364ec383f3c04cb4c676b0be8b760c06c0b689d1a04fc082c66c"
6+
license "MIT"
7+
head "https://github.com/ttytm/wthrr-the-weathercrab.git", branch: "main"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "7123670512710361d2f70dc58f080a71c423e560c82c9a17b597a661595f4cc3"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "24ef173a19782510f7d3ad16b0c8af7f2eee4ab450b9f0e6ed536677523c2d0c"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "bba93a070e6d97685a70aeb241d03abd390e5044ab30272abda2e26f01ba02c4"
13+
sha256 cellar: :any_skip_relocation, sonoma: "153f1ac8df16ffdaed4b9b8ac340c99abf3980fb7a762649b00c53f1993df221"
14+
sha256 cellar: :any_skip_relocation, ventura: "a22a40a694871ae04aefb5df671b0bfd5c9594de31bf8c058077a6c7de677d8b"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "7ef3d52887274f149bda3757fd5044900312081789394a721aaae022073088e9"
16+
end
17+
18+
depends_on "pkg-config" => :build
19+
depends_on "rust" => :build
20+
21+
on_linux do
22+
depends_on "openssl@3"
23+
end
24+
25+
def install
26+
system "cargo", "install", *std_cargo_args
27+
end
28+
29+
test do
30+
assert_match version.to_s, shell_output("#{bin}/wthrr --version")
31+
system bin/"wthrr", "-h"
32+
33+
require "pty"
34+
35+
PTY.spawn(bin/"wthrr", "-l", "en_US", "Kyoto") do |r, _w, pid|
36+
output = r.gets
37+
assert_match "Hey friend. I'm glad you are asking.", output
38+
ensure
39+
Process.kill("TERM", pid)
40+
end
41+
end
42+
end

0 commit comments

Comments
 (0)