97 lines
4.5 KiB
Ruby
97 lines
4.5 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/02/bf/f2ae1f86cefd7bc3d7a6bdcd4cc86b3f7b1152ffc9185656cfe513f223a4/urlwatch-2.24.tar.gz"
|
|
sha256 "f0b36db4bccd38923b178b66408c0d80d3103b7257f286b78e87d991283b86d7"
|
|
license "BSD-3-Clause"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, arm64_monterey: "0372f489dd672ce1039e8e84b0314b8b107691f9bd5a92bcba6b5a67aae1f33e"
|
|
sha256 cellar: :any_skip_relocation, arm64_big_sur: "f99f62a670d045ebe7108ea5becf75d16075ad1d4db390a9281240d01463fd4a"
|
|
sha256 cellar: :any_skip_relocation, monterey: "ed67a5d09962cd875399777a3a58c698e717ee8191106137f48103260715549d"
|
|
sha256 cellar: :any_skip_relocation, big_sur: "a292d078126a25ed8c65c7184f7b9e64336f176e1422350a85ea45279373c43d"
|
|
sha256 cellar: :any_skip_relocation, catalina: "aee5f56d7c32a9aecf926e4767c4afed38aea1a6b7407609cf34ebfc89e281ee"
|
|
end
|
|
|
|
depends_on "python@3.10"
|
|
|
|
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/6c/ae/d26450834f0acc9e3d1f74508da6df1551ceab6c2ce0766a593362d6d57f/certifi-2021.10.8.tar.gz"
|
|
sha256 "78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"
|
|
end
|
|
|
|
resource "charset-normalizer" do
|
|
url "https://files.pythonhosted.org/packages/9f/c5/334c019f92c26e59637bb42bd14a190428874b2b2de75a355da394cf16c1/charset-normalizer-2.0.7.tar.gz"
|
|
sha256 "e019de665e2bcf9c2b64e2e5aa025fa991da8720daa3c1138cadd2fd1856aed0"
|
|
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 "importlib-metadata" do
|
|
url "https://files.pythonhosted.org/packages/2e/6d/4508b1922b1610f6646fd95681fa1b0c092df35ec14018218f4638b7342a/importlib_metadata-4.8.2.tar.gz"
|
|
sha256 "75bdec14c397f528724c1bfd9709d660b33a4d2e77387a3358f20b848bb5e5fb"
|
|
end
|
|
|
|
resource "keyring" do
|
|
url "https://files.pythonhosted.org/packages/cc/24/c5402ba0c6380cc058980e2b73f0597ab6875692f185054a94244b7161ab/keyring-23.2.1.tar.gz"
|
|
sha256 "6334aee6073db2fb1f30892697b1730105b5e9a77ce7e61fca6b435225493efe"
|
|
end
|
|
|
|
resource "lxml" do
|
|
url "https://files.pythonhosted.org/packages/fe/4c/a4dbb4e389f75e69dbfb623462dfe0d0e652107a95481d40084830d29b37/lxml-4.6.4.tar.gz"
|
|
sha256 "daf9bd1fee31f1c7a5928b3e1059e09a8d683ea58fb3ffc773b6c88cb8d1399c"
|
|
end
|
|
|
|
resource "minidb" do
|
|
url "https://files.pythonhosted.org/packages/06/51/0e0a3bc47f1c7bb85f658c55b253d8cee2ac6620b4c5bb55afe4be32ca84/minidb-2.0.5.tar.gz"
|
|
sha256 "30fe89216eb141d5daae3efab2193589043408a2ab33af79654811b81994e964"
|
|
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/e7/01/3569e0b535fb2e4a6c384bdbed00c55b9d78b5084e0fb7f4d0bf523d7670/requests-2.26.0.tar.gz"
|
|
sha256 "b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"
|
|
end
|
|
|
|
resource "urllib3" do
|
|
url "https://files.pythonhosted.org/packages/80/be/3ee43b6c5757cabea19e75b8f46eaf05a2f5144107d7db48c7cf3a864f73/urllib3-1.26.7.tar.gz"
|
|
sha256 "4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece"
|
|
end
|
|
|
|
resource "zipp" do
|
|
url "https://files.pythonhosted.org/packages/02/bf/0d03dbdedb83afec081fefe86cae3a2447250ef1a81ac601a9a56e785401/zipp-3.6.0.tar.gz"
|
|
sha256 "71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"
|
|
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
|