Skip to content

Commit

Permalink
Merge pull request #193774 from Homebrew/update-livecheck
Browse files Browse the repository at this point in the history
various: update livecheck
  • Loading branch information
samford authored Dec 1, 2024
2 parents 86b61f1 + a9ea749 commit 63f493f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Casks/a/adobe-creative-cloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
item = xml.elements["//feature-entry[@id='ccd.fw.update.greenline.latest']/data"]&.text&.strip
next if item.blank?

JSON.parse(item)["version"]
json = Homebrew::Livecheck::Strategy::Json.parse_json(item)
json["version"]
end
end

Expand Down
6 changes: 3 additions & 3 deletions Casks/t/tastytrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

version "2.20.0"
sha256 arm: "659b0775cfced2ab5303e49fe8c4fd4720cca7cb069c754744239b6ad87ac01f",
intel: "34c793f5f32846f4ef1726ab165e98772dd36fb2fdab6af977aff16b4f089613"
intel: "a588efe67b35bd8ea4dbcc5e96def0e3709bbfff0ef53bd257ea030b79b2e173"

url "https://download.tastytrade.com/desktop-#{version.major}.x.x/#{version}/tastytrade-#{version}#{arch}.dmg"
name "tastytrade"
Expand All @@ -26,9 +26,9 @@
break if requests > 4

content = Homebrew::Livecheck::Strategy.page_content("https://tastytrade.com/page-data/sq/d/#{static_hash}.json")
next if content.blank? || content[:content].blank?
next if content[:content].blank?

hash_json = JSON.parse(content[:content])
hash_json = Homebrew::Livecheck::Strategy::Json.parse_json(content[:content])
version = hash_json.dig("data", "contentstackGlobalSettings", "tastyworksSoftware", "desktopVersion")
break version if version.present?
end
Expand Down

0 comments on commit 63f493f

Please sign in to comment.