cask "jetbrains-gateway" do arch arm: "-aarch64" version "2024.3,243.21565.196" sha256 arm: "e2ad82e41258e108fd6844a182148db036f8211dc5f69e13de899f529c0345df", intel: "ea9c1e37afc2a67357755df9c4c12bfaca0106e1d4a6630a5abab9a40a7e8bab" url "https://download.jetbrains.com/idea/gateway/JetBrainsGateway-#{version.csv.first}#{arch}.dmg" name "jetbrains-gateway" desc "Remote development gateway by Jetbrains" homepage "https://www.jetbrains.com/remote-development/gateway/" livecheck do url "https://data.services.jetbrains.com/products/releases?code=GW&latest=true&type=release" strategy :json do |json| json["GW"]&.map do |release| version = release["version"] build = release["build"] next if version.blank? || build.blank? "#{version},#{build}" end end end auto_updates true depends_on macos: ">= :high_sierra" app "JetBrains Gateway.app" binary "#{appdir}/JetBrains Gateway.app/Contents/MacOS/gateway" zap trash: [ "~/Library/Application Support/JetBrains/JetBrainsGateway#{version.major_minor}", "~/Library/Caches/JetBrains/JetBrainsGateway#{version.major_minor}", "~/Library/Logs/JetBrains/JetBrainsGateway#{version.major_minor}", "~/Library/Preferences/com.jetbrains.gateway.plist", "~/Library/Saved Application State/com.jetbrains.gateway.savedState", ] end