2017-12-10 17:09:09 +00:00
|
|
|
class Ddgr < Formula
|
|
|
|
desc "DuckDuckGo from the terminal"
|
|
|
|
homepage "https://github.com/jarun/ddgr"
|
2018-04-05 05:04:49 +00:00
|
|
|
url "https://github.com/jarun/ddgr/archive/v1.4.tar.gz"
|
|
|
|
sha256 "045063b4d7262992a7ea3cd9fe9715a199318828de82073f54c42631d3ef41b7"
|
2017-12-10 17:09:09 +00:00
|
|
|
|
2017-12-10 18:20:30 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2018-04-05 05:09:31 +00:00
|
|
|
sha256 "1fcc37ddba0118645c78282e191b7c13568e40e72c07c69366223e1656310845" => :high_sierra
|
|
|
|
sha256 "1fcc37ddba0118645c78282e191b7c13568e40e72c07c69366223e1656310845" => :sierra
|
|
|
|
sha256 "1fcc37ddba0118645c78282e191b7c13568e40e72c07c69366223e1656310845" => :el_capitan
|
2017-12-10 18:20:30 +00:00
|
|
|
end
|
|
|
|
|
2018-02-27 16:37:53 +00:00
|
|
|
depends_on "python"
|
2017-12-10 17:09:09 +00:00
|
|
|
|
|
|
|
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
|