67 lines
2.7 KiB
Ruby
67 lines
2.7 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.1.1.tar.gz"
|
|
sha256 "1f58b1374dc9e2711bab5d78740ab17fa81dc89aca14e7ea75c10631e6e81227"
|
|
head "https://github.com/usit-gd/zabbix-cli.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "bc2cca8aba0a57cd443c04111875c3dcd9c4a3e4b58e5368bd265ceddfe18d26" => :catalina
|
|
sha256 "27334ed941525d5eca30f6ce21c9ca9caab0956d4f218b1e951f3c0e0bad7387" => :mojave
|
|
sha256 "c0121fb46cbca0ff72d19e6f4e1c26a7f1cf988206fc3efb00a6826a2ab31cd3" => :high_sierra
|
|
sha256 "f61ee16a471a92e786e4da862cdd9a510439db832719bef33a3962bd1ec8f003" => :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
|