Skip to content

Commit

Permalink
idrive: update livecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
samford committed Jul 5, 2024
1 parent be3a695 commit 58e4522
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Casks/i/idrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
livecheck do
url "https://static.idriveonlinebackup.com/downloads/version_mac.js"
strategy :page_match do |page|
version = page.match(/Version:?\s*(\d+(?:\.\d+)*)/i)
next if version.blank?
version_match = page.match(/Version:?\s*v?(\d+(?:\.\d+)+)/i)
next if version_match.blank?

download_id = page.match(%r{downloads/(\w+)/}i)
next if download_id.blank?
id_match = page.match(%r{downloads/v?(\d+(?:\.\d+)*)/}i)
next if id_match.blank?

"#{version[1]},#{download_id[1]}"
"#{version_match[1]},#{id_match[1]}"
end
end

Expand Down

0 comments on commit 58e4522

Please sign in to comment.