ddgr 1.2 (new formula)

Closes #21539.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
Zhiming Wang 2017-12-10 12:09:09 -05:00 committed by ilovezfs
parent 815b6cc5e3
commit 6edb9948e6

20
Formula/ddgr.rb Normal file
View file

@ -0,0 +1,20 @@
class Ddgr < Formula
desc "DuckDuckGo from the terminal"
homepage "https://github.com/jarun/ddgr"
url "https://github.com/jarun/ddgr/archive/v1.2.tar.gz"
sha256 "a9828b8863949dc93dd574a15b6779d9390b6f5e277e35c157064d7c06423758"
depends_on :python3
def install
system "make", "install", "PREFIX=#{prefix}"
bash_completion.install "auto-completion/bash/ddgr-completion.bash"
fish_completion.install "auto-completion/fish/ddgr.fish"
zsh_completion.install "auto-completion/zsh/_ddgr"
end
test do
ENV["PYTHONIOENCODING"] = "utf-8"
assert_match "Homebrew", shell_output("#{bin}/ddgr --noprompt Homebrew")
end
end