cask "jetbrains-toolbox" do arch arm: "-arm64" version "2.5,2.5.1.34629" sha256 arm: "c79fd07a0fc887424332fc48f933a4e3083a637c4d47cc78355a2af0e5ef7621", intel: "0a751b1572d88d1b65d2493e33e974ff09585d86d77170ebec9ea278f34d5264" url "https://download.jetbrains.com/toolbox/jetbrains-toolbox-#{version.csv.second}#{arch}.dmg" name "JetBrains Toolbox" desc "JetBrains tools manager" homepage "https://www.jetbrains.com/toolbox-app/" livecheck do url "https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release" strategy :json do |json| json["TBA"]&.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: ">= :mojave" app "JetBrains Toolbox.app" uninstall launchctl: "com.jetbrains.toolbox", signal: ["TERM", "com.jetbrains.toolbox"] zap trash: [ "~/Library/Application Support/JetBrains/Toolbox", "~/Library/Caches/JetBrains/Toolbox", "~/Library/Logs/JetBrains/Toolbox", "~/Library/Preferences/com.jetbrains.toolbox.renderer.plist", "~/Library/Saved Application State/com.jetbrains.toolbox.savedState", ], rmdir: [ "~/Library/Application Support/JetBrains", "~/Library/Caches/JetBrains", "~/Library/Logs/JetBrains", ] end