cask "vbrokers" do version "2.4.813,600001,1725005835" sha256 "a13a83bc049a71f751304b7b50f90de9db675f68a274ebd8c60ad3c2f42b880b" url "https://r.hstong.com/public/app/Mac/HSTONG_Mac_#{version.csv.second}_#{version.csv.first}_#{version.csv.third}.dmg" name "VBrokers" desc "Trading platform" homepage "https://www.hstong.com/" livecheck do url "https://www.hstong.com/download" regex(%r{href=['"].*?/HSTONG[-_]?Mac[-_]?(\d+)[-_]?(\d+(?:\.\d+)+)[-_]?(\d+).dmg}i) strategy :page_match do |page, regex| page.scan(regex) .map { |match| "#{match[1]},#{match[0]},#{match[2]}" } end end # Rename to match displayed name app "HSTong.app", target: "VBrokers.app" zap trash: [ "~/Library/Application Scripts/com.hszq.HSSecuritiesForMac", "~/Library/Containers/com.hszq.HSSecuritiesForMac", ] end