cask "mongodb-compass-readonly" do arch arm: "arm64", intel: "x64" version "1.44.6" sha256 arm: "c94b81b5d9fb36070d4e82fd22c6b11fefb22000e58a0728c6893f3556b0ed93", intel: "56f13adcbb47dc233275e3f282b9e4c9df923e1abedaa93bfcb5bd781e1a8dc1" url "https://downloads.mongodb.com/compass/mongodb-compass-readonly-#{version}-darwin-#{arch}.dmg" name "MongoDB Compass Readonly" desc "Interactive tool for analyzing MongoDB data" homepage "https://www.mongodb.com/products/compass" livecheck do url "https://info-mongodb-com.s3.amazonaws.com/com-download-center/compass.json" regex(/^v?(\d+(?:\.\d+)+)[._-]readonly$/i) strategy :json do |json, regex| json["versions"]&.map do |item| match = item["_id"]&.match(regex) next if match.blank? match[1] end end end app "MongoDB Compass Readonly.app" zap trash: [ "~/.mongodb/compass", "~/Library/Application Support/MongoDB Compass Readonly", "~/Library/Caches/com.mongodb.compass.readonly", "~/Library/Caches/com.mongodb.compass.readonly.ShipIt", "~/Library/Preferences/com.mongodb.compass.readonly.plist", "~/Library/Saved Application State/com.mongodb.compass.readonly.savedState", ] end