66 lines
2.6 KiB
Ruby
66 lines
2.6 KiB
Ruby
class ZabbixCli < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "CLI tool for interacting with Zabbix monitoring system"
|
|
homepage "https://github.com/usit-gd/zabbix-cli/"
|
|
url "https://github.com/usit-gd/zabbix-cli/archive/2.0.1.tar.gz"
|
|
sha256 "237e4ec82f8e070ebd69d6f2df6cecd086663320c67e7afbab39ebb6460ea132"
|
|
head "https://github.com/usit-gd/zabbix-cli.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "44f00b786590c8cf2c8d0cb85015537b0ee478ccb75ce0c2b8100e10f5a5e74e" => :mojave
|
|
sha256 "60f771c174df15328657938e91a3bfd98291b2854a378fa14df6742ea9a1ed3f" => :high_sierra
|
|
sha256 "c696cd8b4f8aa3a78e9c77c7b7b813df9b9459eb8ee76252f4e74975af0b5ed9" => :sierra
|
|
end
|
|
|
|
depends_on "python"
|
|
|
|
## direct dependencies
|
|
|
|
resource "docutils" do
|
|
url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz"
|
|
sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274"
|
|
end
|
|
|
|
resource "requests" do
|
|
url "https://files.pythonhosted.org/packages/52/2c/514e4ac25da2b08ca5a464c50463682126385c4272c18193876e91f4bc38/requests-2.21.0.tar.gz"
|
|
sha256 "502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e"
|
|
end
|
|
|
|
## indirect dependencies
|
|
|
|
resource "certifi" do
|
|
url "https://files.pythonhosted.org/packages/55/54/3ce77783acba5979ce16674fc98b1920d00b01d337cfaaf5db22543505ed/certifi-2018.11.29.tar.gz"
|
|
sha256 "47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7"
|
|
end
|
|
|
|
resource "chardet" do
|
|
url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz"
|
|
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
|
|
end
|
|
|
|
resource "idna" do
|
|
url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz"
|
|
sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
|
|
end
|
|
|
|
resource "urllib3" do
|
|
url "https://files.pythonhosted.org/packages/b1/53/37d82ab391393565f2f831b8eedbffd57db5a718216f82f1a8b4d381a1c1/urllib3-1.24.1.tar.gz"
|
|
sha256 "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22"
|
|
end
|
|
|
|
def install
|
|
# script tries to install config directly to /usr/local/bin
|
|
inreplace "setup.py", "/usr/local/bin", share
|
|
|
|
virtualenv_install_with_resources
|
|
end
|
|
|
|
test do
|
|
system bin/"zabbix-cli-init", "-z", "https://homebrew-test.example.com/"
|
|
config = testpath/".zabbix-cli/zabbix-cli.conf"
|
|
assert_predicate config, :exist?
|
|
assert_match "homebrew-test.example.com", File.read(config)
|
|
end
|
|
end
|