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