homebrew-core/Formula/ydcv.rb

21 lines
584 B
Ruby
Raw Normal View History

2017-10-30 10:49:11 +00:00
class Ydcv < Formula
desc "YouDao Console Version"
homepage "https://github.com/felixonmars/ydcv"
2017-12-06 14:38:15 +00:00
url "https://github.com/felixonmars/ydcv/archive/0.5.tar.gz"
sha256 "8f030c15d241ff317381cf97bacf3140080e34c1a4c4c685265dfdb05c8b8a10"
2017-10-30 10:49:11 +00:00
bottle :unneeded
depends_on :python if MacOS.version <= :snow_leopard
def install
2017-12-06 14:38:15 +00:00
bin.install "src/ydcv.py" => "ydcv"
2017-10-30 10:49:11 +00:00
zsh_completion.install "contrib/zsh_completion" => "_ydcv"
end
test do
assert_match "hello", shell_output("#{bin}/ydcv 你好")
assert_match "你好", shell_output("#{bin}/ydcv hello")
end
end