cask "sunsama" do arch arm: "arm64", intel: "x64" version "3.1.1,250512vfxlcgvds" sha256 arm: "03efabf1f4465502713a03d5be8f9487eea504564bc25e0fdb7506d6322b58e7", intel: "ee55868e67eee4d7ac2c82f3f7489da8896eeb044fe1c2c491a129e8be64c6fa" url "https://download.todesktop.com/2003096gmmnl0g1/Sunsama%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-#{arch}-mac.zip", verified: "download.todesktop.com/2003096gmmnl0g1/" name "Sunsama" desc "Daily planner and calendar" homepage "https://www.sunsama.com/desktop" livecheck do url "https://download.todesktop.com/2003096gmmnl0g1/latest-mac.yml" regex(/Build[ ._-]([^-]+)[._-]/i) strategy :electron_builder do |yaml, regex| yaml["files"]&.map do |item| match = item["url"]&.match(regex) next if match.blank? "#{yaml["version"]},#{match[1]}" end end end auto_updates true depends_on macos: ">= :big_sur" app "Sunsama.app" zap trash: [ "~/Library/Application Support/Sunsama", "~/Library/Logs/Sunsama", "~/Library/Preferences/com.sunsama.native-app.plist", "~/Library/Saved Application State/com.sunsama.native-app.savedState", ] end