homebrew-core/Formula/urlwatch.rb

92 lines
4.2 KiB
Ruby

class Urlwatch < Formula
include Language::Python::Virtualenv
desc "Get notified when a webpage changes"
homepage "https://thp.io/2008/urlwatch/"
url "https://files.pythonhosted.org/packages/e1/1d/283de30cfc04c3601fc73eca4f1b2a5cb5a25a9fa715eb2bf9678ab45d0d/urlwatch-2.25.tar.gz"
sha256 "6802297d3318286e7f3d36b9a4567a2fb09b0ae779d4b76811dd29a7281c1f8a"
license "BSD-3-Clause"
revision 1
bottle do
sha256 cellar: :any_skip_relocation, arm64_monterey: "c2e22fffd6ab90f1212bf59b003a071361468ad79a04ae1dfc0bf0e2431c6b98"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "043bc3826735afad9a5a8ef8c14fde5a8bd9652b4dc5a672c641ebdfeac3714f"
sha256 cellar: :any_skip_relocation, monterey: "993fb520eb97723a031a20ff8500b681c449e5416430d938046ff5e93a9a31ab"
sha256 cellar: :any_skip_relocation, big_sur: "c3a726ce4ca78af4ef1513a996add5f71917467d8a58b36275e4afb1f04cb60f"
sha256 cellar: :any_skip_relocation, catalina: "4732b3f43e5d06bc9ef7684d6e7e14faa02549d81bd9dec86b6b5eedac5ef6bc"
sha256 cellar: :any_skip_relocation, x86_64_linux: "db4b7ef718623105d0beb77562c89c10268be8fdddab0a8942147f205158acfd"
end
depends_on "python@3.10"
uses_from_macos "libxml2"
uses_from_macos "libxslt"
resource "appdirs" do
url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz"
sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"
end
resource "certifi" do
url "https://files.pythonhosted.org/packages/cc/85/319a8a684e8ac6d87a1193090e06b6bbb302717496380e225ee10487c888/certifi-2022.6.15.tar.gz"
sha256 "84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"
end
resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/93/1d/d9392056df6670ae2a29fcb04cfa5cee9f6fbde7311a1bb511d4115e9b7a/charset-normalizer-2.1.0.tar.gz"
sha256 "575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"
end
resource "cssselect" do
url "https://files.pythonhosted.org/packages/70/54/37630f6eb2c214cdee2ae56b7287394c8aa2f3bafb8b4eb8c3791aae7a14/cssselect-1.1.0.tar.gz"
sha256 "f95f8dedd925fd8f54edb3d2dfb44c190d9d18512377d3c1e2388d16126879bc"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/62/08/e3fc7c8161090f742f504f40b1bccbfc544d4a4e09eb774bf40aafce5436/idna-3.3.tar.gz"
sha256 "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"
end
resource "keyring" do
url "https://files.pythonhosted.org/packages/a4/9e/9d9eb6a6dc4f347bae8200a2e1dd65a7b96ae99e29ef8f7452ccc4ef9eea/keyring-23.6.0.tar.gz"
sha256 "3ac00c26e4c93739e19103091a9986a9f79665a78cf15a4df1dba7ea9ac8da2f"
end
resource "lxml" do
url "https://files.pythonhosted.org/packages/70/bb/7a2c7b4f8f434aa1ee801704bf08f1e53d7b5feba3d5313ab17003477808/lxml-4.9.1.tar.gz"
sha256 "fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"
end
resource "minidb" do
url "https://files.pythonhosted.org/packages/21/75/2356bd4dcc48a8af77b0d2ded8984ceba5e4c71f67e9734ec9e378467ebd/minidb-2.0.6.tar.gz"
sha256 "8bf0aca9b89cb1e8b7bfd8ad8b5a7208bd2fb046e343b3d656ea00f8bcfd6f5e"
end
resource "PyYAML" do
url "https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz"
sha256 "68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/a5/61/a867851fd5ab77277495a8709ddda0861b28163c4613b011bc00228cc724/requests-2.28.1.tar.gz"
sha256 "7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/25/36/f056e5f1389004cf886bb7a8514077f24224238a7534497c014a6b9ac770/urllib3-1.26.10.tar.gz"
sha256 "879ba4d1e89654d9769ce13121e0f94310ea32e8d2f8cf587b77c08bbcdb30d6"
end
def install
virtualenv_install_with_resources
end
test do
(testpath/"config.yaml").write("")
(testpath/"urls.yaml").write("")
output = shell_output("#{bin}/urlwatch --config #{testpath/"config.yaml"} " \
"--urls #{testpath/"urls.yaml"} --test-filter 1", 1)
assert_match("Not found: '1'", output)
end
end