cask "sunsama" do arch arm: "arm64", intel: "x64" version "3.0.1,241029f5bsz3j9p" sha256 arm: "bca56e71681c0cd64be7e1f04fdd412fbf5de623a744eb9a318eca3d6b63a9ee", intel: "c55a1db19fad9af56dd0c43bb96f8b813e446a056e5282c5708682cb508c14a2" 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