Skip to content

Commit 1e81488

Browse files
moonfruitchenrui333
authored andcommitted
doge 0.2.9 (new formula)
doge: update homepage and add version check Signed-off-by: Rui Chen <[email protected]>
1 parent cde2d0f commit 1e81488

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Formula/d/doge.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
class Doge < Formula
2+
desc "Command-line DNS client"
3+
homepage "https://dog.ramfield.net/"
4+
url "https://github.com/Dj-Codeman/dog_community/archive/refs/tags/v0.2.9.tar.gz"
5+
sha256 "21d459f1f88d6a1e001a747b84782f180c01de8f3c39f3a1389c352b2f2edc88"
6+
license "EUPL-1.2"
7+
8+
depends_on "pandoc" => :build
9+
depends_on "pkgconf" => :build
10+
depends_on "rust" => :build
11+
12+
on_linux do
13+
depends_on "openssl@3"
14+
end
15+
16+
def install
17+
system "cargo", "install", *std_cargo_args
18+
19+
bash_completion.install "completions/doge.bash" => "doge"
20+
zsh_completion.install "completions/doge.zsh" => "_doge"
21+
fish_completion.install "completions/doge.fish"
22+
23+
args = %w[
24+
--standalone
25+
--from=markdown
26+
--to=man
27+
]
28+
system "pandoc", *args, "man/doge.1.md", "-o", "doge.1"
29+
man1.install "doge.1"
30+
end
31+
32+
test do
33+
assert_match version.to_s, shell_output("#{bin}/doge --version")
34+
35+
output = shell_output("#{bin}/doge dns.google A --seconds --color=never")
36+
assert_match(/^A\s+dns\.google\.\s+\d+\s+8\.8\.4\.4/, output)
37+
assert_match(/^A\s+dns\.google\.\s+\d+\s+8\.8\.8\.8/, output)
38+
end
39+
end

0 commit comments

Comments
 (0)