Skip to content

Commit e9a9937

Browse files
committed
gruyere 0.0.9 (new formula)
Signed-off-by: Rui Chen <[email protected]>
1 parent 6d7563a commit e9a9937

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

Formula/g/gruyere.rb

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
class Gruyere < Formula
2+
include Language::Python::Virtualenv
3+
4+
desc "Powerful and secure TUI environment variable manager"
5+
homepage "https://github.com/savannahostrowski/gruyere"
6+
url "https://files.pythonhosted.org/packages/b0/a3/0951f7043389bc2a32ce8613dbc6b5078d10a4a754bc136294e7c2661a77/gruyere-0.0.9.tar.gz"
7+
sha256 "71bbc896188584744009b73363dc5631d3cf7a4855fdf0249be7bf09a84153fa"
8+
license "MIT"
9+
head "https://github.com/savannahostrowski/gruyere.git", branch: "main"
10+
11+
depends_on "[email protected]"
12+
13+
resource "click" do
14+
url "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz"
15+
sha256 "e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4"
16+
end
17+
18+
resource "markdown-it-py" do
19+
url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz"
20+
sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3"
21+
end
22+
23+
resource "mdurl" do
24+
url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz"
25+
sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"
26+
end
27+
28+
resource "psutil" do
29+
url "https://files.pythonhosted.org/packages/e1/88/bdd0a41e5857d5d703287598cbf08dad90aed56774ea52ae071bae9071b6/psutil-7.1.3.tar.gz"
30+
sha256 "6c86281738d77335af7aec228328e944b30930899ea760ecf33a4dba66be5e74"
31+
end
32+
33+
resource "pygments" do
34+
url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz"
35+
sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"
36+
end
37+
38+
resource "readchar" do
39+
url "https://files.pythonhosted.org/packages/dd/f8/8657b8cbb4ebeabfbdf991ac40eca8a1d1bd012011bd44ad1ed10f5cb494/readchar-4.2.1.tar.gz"
40+
sha256 "91ce3faf07688de14d800592951e5575e9c7a3213738ed01d394dcc949b79adb"
41+
end
42+
43+
resource "rich" do
44+
url "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz"
45+
sha256 "73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4"
46+
end
47+
48+
resource "shellingham" do
49+
url "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz"
50+
sha256 "8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"
51+
end
52+
53+
resource "typer" do
54+
url "https://files.pythonhosted.org/packages/8f/28/7c85c8032b91dbe79725b6f17d2fffc595dff06a35c7a30a37bef73a1ab4/typer-0.20.0.tar.gz"
55+
sha256 "1aaf6494031793e4876fb0bacfa6a912b551cf43c1e63c800df8b1a866720c37"
56+
end
57+
58+
resource "typing-extensions" do
59+
url "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz"
60+
sha256 "0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"
61+
end
62+
63+
def install
64+
virtualenv_install_with_resources
65+
66+
# `shellingham` auto-detection doesn't work in Homebrew CI build environment so
67+
# disable it to allow `typer` to use argument as shell for completions
68+
# Ref: https://typer.tiangolo.com/features/#user-friendly-cli-apps
69+
ENV["_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION"] = "1"
70+
generate_completions_from_executable(bin/"gruyere", "--show-completion")
71+
end
72+
73+
test do
74+
output_log = testpath/"output.log"
75+
pid = spawn bin/"gruyere", "--details", [:out, :err] => output_log.to_s
76+
sleep 2
77+
assert_match "Here's what's running...", output_log.read
78+
ensure
79+
Process.kill("TERM", pid)
80+
Process.wait(pid)
81+
end
82+
end

0 commit comments

Comments
 (0)