homebrew-core/Formula/ydcv.rb
2018-04-09 00:42:29 -07:00

20 lines
553 B
Ruby

class Ydcv < Formula
desc "YouDao Console Version"
homepage "https://github.com/felixonmars/ydcv"
url "https://github.com/felixonmars/ydcv/archive/0.5.tar.gz"
sha256 "8f030c15d241ff317381cf97bacf3140080e34c1a4c4c685265dfdb05c8b8a10"
bottle :unneeded
depends_on "python@2"
def install
bin.install "src/ydcv.py" => "ydcv"
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