cask "whimsical" do arch arm: "arm64", intel: "x64" version "0.2.9,241106pip7sjxuc" sha256 arm: "98785aa903ca8b1ea108a01ee1e710a3244bc16514cf9c53ca95ec0c076dfdaa", intel: "0ce53a61adf066da4aabc6e529f39cecc87865a6c562b44df7e25c9912576a84" url "https://download.todesktop.com/2402209z4j37b73/Whimsical%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-#{arch}-mac.zip", verified: "download.todesktop.com/2402209z4j37b73/" name "Whimsical" desc "Collaboration and diagramming tool" homepage "https://whimsical.com/" livecheck do url "https://download.todesktop.com/2402209z4j37b73/latest-mac.yml" regex(/Whimsical\s(\d+(?:\.\d+)+)(?:\s-\sBuild\s([a-z\d]+?))?-#{arch}-mac\.zip/i) strategy :electron_builder do |yaml, regex| yaml["files"]&.map do |item| match = item["url"]&.match(regex) next if match.blank? match[2].present? ? "#{match[1]},#{match[2]}" : match[1] end end end auto_updates true depends_on macos: ">= :catalina" app "Whimsical.app" zap trash: [ "~/Library/Application Support/Whimsical", "~/Library/Caches/com.whimsical.desktop", "~/Library/Caches/com.whimsical.desktop.ShipIt", "~/Library/Logs/Whimsical", "~/Library/Preferences/com.whimsical.desktop.plist", "~/Library/Saved Application State/com.whimsical.desktop.savedState", ] end