Merge pull request #200541 from Homebrew/bump-roam-147.0.0-beta001
[Homebrew/homebrew-cask.git] / Casks / u / usmart-trade.rb
bloba3909d30ea51f63460fb3682ef7f9c4ffc276092
1 cask "usmart-trade" do
2   version "3.29.1,da8177bd-4bc5-40d5-a482-d497b050ea3b,2025-01-08"
3   sha256 "f44f7316b3689fc1bff53108fba7b449d15915f4b1950f605e30bfec95b00fa0"
5   url "https://jy-common-prd-1257884527.cos.ap-guangzhou.myqcloud.com/admin/app-version-file/#{version.csv.third}/#{version.csv.second}/uSMART%20Trade-#{version.csv.first}.dmg",
6       verified: "jy-common-prd-1257884527.cos.ap-guangzhou.myqcloud.com/"
7   name "uSMART Trade"
8   desc "Stock and options trading platform"
9   homepage "https://www.usmartglobal.com/"
11   livecheck do
12     url "https://www.usmart.hk/en/download"
13     regex(%r{href=['"].*?file/(\d+[-_]\d+[-_]\d+)/((?:\w+-)+(?:\w+))/.*?Trade[-_]?(\d+(?:\.\d+)+)\.dmg}i)
14     strategy :page_match do |page, regex|
15       page.scan(regex)
16           .map { |match| "#{match[2]},#{match[1]},#{match[0]}" }
17     end
18   end
20   app "uSMART Trade.app"
22   zap trash: [
23     "~/Library/Application Support/uSmart",
24     "~/Library/Preferences/com.usmart.mac.test.plist",
25     "~/Library/Saved Application State/com.usmart.mac.test.savedState",
26   ]
28   caveats do
29     requires_rosetta
30   end
31 end