From 1f7255f74d1ebb50d37bedb40bbe91ed3aa9e67d Mon Sep 17 00:00:00 2001 From: Dario Vladovic Date: Sun, 8 Nov 2020 02:00:29 +0100 Subject: [PATCH] dog 0.1.0 (new formula) Closes #64389. Signed-off-by: chenrui Signed-off-by: Dawid Dziurla --- Formula/dog.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Formula/dog.rb diff --git a/Formula/dog.rb b/Formula/dog.rb new file mode 100644 index 00000000000..308a8326a6d --- /dev/null +++ b/Formula/dog.rb @@ -0,0 +1,27 @@ +class Dog < Formula + desc "Command-line DNS client" + homepage "https://dns.lookup.dog/" + url "https://github.com/ogham/dog/archive/v0.1.0.tar.gz" + sha256 "82387d38727bac7fcdb080970e84b36de80bfe7923ce83f993a77d9ac7847858" + license "EUPL-1.2" + head "https://github.com/ogham/dog.git" + + depends_on "just" => :build + depends_on "pandoc" => :build + depends_on "rust" => :build + + def install + system "cargo", "install", *std_cargo_args + bash_completion.install "completions/dog.bash" => "dog" + zsh_completion.install "completions/dog.zsh" => "_dog" + fish_completion.install "completions/dog.fish" + system "just", "man" + man1.install "target/man/dog.1" + end + + test do + output = shell_output("#{bin}/dog dns.google A --seconds --color=never") + assert_match /^A\s+dns\.google\.\s+\d+\s+8\.8\.4\.4/, output + assert_match /^A\s+dns\.google\.\s+\d+\s+8\.8\.8\.8/, output + end +end