cask "gifox" do version "2.6.5,020605.00" sha256 "2b4de3907ffd92eabbabb765f874d7968048f257d1bd60c8d5e43589bb634590" url "https://d1fqctmfkpkkcg.cloudfront.net/gifox/#{version.csv.second}.dmg", verified: "d1fqctmfkpkkcg.cloudfront.net/gifox/" name "gifox" desc "GIF recording and sharing" homepage "https://gifox.io/" livecheck do url "https://gifox.app/changelog/" regex(%r{href=.*?/v?(\d+(?:\.\d+)+)\.dmg.*?Version\s+v?(\d+(?:\.\d+)+)}i) strategy :page_match do |page, regex| page.scan(regex).map { |match| "#{match[1]},#{match[0]}" } end end depends_on macos: ">= :high_sierra" app "Gifox.app" uninstall launchctl: "com.gifox.gifox#{version.major}.agent", quit: "com.gifox.gifox#{version.major}" zap trash: [ "~/Library/Application Support/Gifox #{version.major}", "~/Library/Caches/com.gifox.gifox#{version.major}", "~/Library/Cookies/com.gifox.gifox#{version.major}.binarycookies", "~/Library/Preferences/com.gifox.gifox#{version.major}.plist", ] end