class Cheat < Formula include Language::Python::Virtualenv desc "Create and view interactive cheat sheets for *nix commands" homepage "https://github.com/chrisallenlane/cheat" url "https://github.com/chrisallenlane/cheat/archive/2.2.0.tar.gz" sha256 "a7860535fbb4156f8bc06d901080fb0eb0ba6526bcf336a80bed8b9355656c79" head "https://github.com/chrisallenlane/cheat.git" bottle do cellar :any_skip_relocation sha256 "671a39b92371c3bdfa79f3a3cd17395c23362b1b5c06297363a53ffe56ced9a0" => :sierra sha256 "46be2714a5ed03794e45b7c89b439b1adc34f3ba0949167e1f835b17e5d73736" => :el_capitan sha256 "687ef459bad701073c784ddbd5ee9864e422d5910a37702b479dba643a387b5e" => :yosemite end depends_on :python if MacOS.version <= :snow_leopard resource "docopt" do url "https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz" sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" end resource "Pygments" do url "https://files.pythonhosted.org/packages/b8/67/ab177979be1c81bc99c8d0592ef22d547e70bb4c6815c383286ed5dec504/Pygments-2.1.3.tar.gz" sha256 "88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81" end def install virtualenv_install_with_resources bash_completion.install "cheat/autocompletion/cheat.bash" zsh_completion.install "cheat/autocompletion/cheat.zsh" => "_cheat" end test do system bin/"cheat", "tar" end end