From 2bc1bf19c02fa3438c6565f49c8d1ff7f75c1dfc Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:54:02 -0500 Subject: [PATCH] tableau: update livecheck The previous `livecheck` block for `tableau` checked an XML file that contained version information for Tableau Desktop but it hasn't been updated for 2024.3.x releases. This updates the `livecheck` block to check the upstream Releases page for now, as it contains version information for the newest versions (e.g., 2024.3.0, 2024.3.1). --- Casks/t/tableau.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Casks/t/tableau.rb b/Casks/t/tableau.rb index a25ade78fdb39..03e22ff3503b0 100644 --- a/Casks/t/tableau.rb +++ b/Casks/t/tableau.rb @@ -12,10 +12,16 @@ homepage "https://www.tableau.com/products/desktop" livecheck do - url "https://www.tableau.com/app/discover/desktop" - strategy :page_match do |page| - match = page.match(/]+data-version-before=["'](\d+\.\d+\.\d+)["']/i) - match[1] if match + url "https://www.tableau.com/support/releases" + regex(%r{href=.*?desktop/v?(\d+(?:\.\d+)+)[^"' >]*["' >]}i) + strategy :page_match do |page, regex| + page.scan(regex).map do |match| + if (version = match[0]).count(".") >= 2 + version + else + "#{version}.0" + end + end end end