cask "sunsama" do arch arm: "arm64", intel: "x64" version "3.4.14,2610024fcalyyd7" sha256 arm: "e341941acb102321350862590bd2ed331f842ea7a127b82707ce570593c4d0dc", intel: "11d2daca22b1a3a9e8887d6880025d50d311958b27221ac077d1458e9001967c" url "https://download.todesktop.com/2003096gmmnl0g1/Sunsama%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-#{arch}-mac.zip" 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: :ventura 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