28 lines
1.0 KiB
Ruby
28 lines
1.0 KiB
Ruby
cask "usmart-trade" do
|
|
version "3.24.0,1f555bde-8bd4-4b4a-bded-10aab33978d6,2023-08-02"
|
|
sha256 "c6fae9321cc8e406887df5ef5228828184fa5d16183959956c4467a7dee4d247"
|
|
|
|
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",
|
|
verified: "jy-common-prd-1257884527.cos.ap-guangzhou.myqcloud.com/"
|
|
name "uSMART Trade"
|
|
desc "Stock and options trading platform"
|
|
homepage "https://www.usmartglobal.com/"
|
|
|
|
livecheck do
|
|
url "https://www.usmart.hk/en/download"
|
|
regex(%r{href=['"].*?file/(\d+[-_]\d+[-_]\d+)/((?:\w+-)+(?:\w+))/.*?Trade[-_]?(\d+(?:\.\d+)+).dmg}i)
|
|
strategy :page_match do |page|
|
|
page.scan(regex)
|
|
.map { |match| "#{match[2]},#{match[1]},#{match[0]}" }
|
|
end
|
|
end
|
|
|
|
app "uSMART Trade.app"
|
|
|
|
zap trash: [
|
|
"~/Library/Application Support/uSmart",
|
|
"~/Library/Preferences/com.usmart.mac.test.plist",
|
|
"~/Library/Saved Application State/com.usmart.mac.test.savedState",
|
|
]
|
|
end
|