cask "whimsical" do arch arm: "arm64", intel: "x64" version "0.3.1,250619iu3cgz3fp" sha256 arm: "720349c0da7ceb6cf6e82919356089023485a65178fd46398dcec0ef5345b9b0", intel: "160d64fc8d247b674a4527a5cc5ddc1bff8152a6c7e76a4f6647939692096f98" 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