cask "busycal" do version "3.12.2,2021-01-06-02-25" sha256 "f87f4d81266d05fceb5813a13a4034b7cca13bc60103634bc29c25badbd4258f" url "https://7e968b6ce8a839f034d9-23cfb9eddcb7b94cb43ba95f95a76900.ssl.cf1.rackcdn.com/bcl-#{version.before_comma}-#{version.after_comma}.zip", verified: "7e968b6ce8a839f034d9-23cfb9eddcb7b94cb43ba95f95a76900.ssl.cf1.rackcdn.com/" name "BusyCal" desc "Calendar software focusing on flexibility and reliability" homepage "https://busymac.com/busycal/index.html" livecheck do url "https://www.busymac.com/download/BusyCal.zip" strategy :header_match do |headers| match = headers["location"].match(/bcl-(\d+(?:\.\d+)*)-(.*?)\.zip/) "#{match[1]},#{match[2]}" end end auto_updates true depends_on macos: ">= :el_capitan" pkg "BusyCal Installer.pkg" uninstall pkgutil: "com.busymac.busycal#{version.major}.pkg", quit: "N4RA379GBW.com.busymac.busycal#{version.major}.alarm", signal: ["TERM", "com.busymac.busycal#{version.major}"] zap trash: [ "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.busymac.busycal#{version.major}.sfl*", "~/Library/Containers/com.busymac.busycal#{version.major}", "~/Library/Containers/N4RA379GBW.com.busymac.busycal#{version.major}.alarm", "~/Library/Group Containers/com.busymac.busycal#{version.major}", "~/Library/Group Containers/N4RA379GBW.com.busymac.busycal#{version.major}", ] end