cask "appium-inspector" do arch arm: "arm64", intel: "x64" version "2024.9.1" sha256 arm: "3bf437adb450ad8d4e29f400e0282d59bfc15afdf8b664aad8d91fdff8abae9c", intel: "541f5a9e2b747e639acd73ae1545b75555a7709b26756082b92a49df636e6655" url "https://github.com/appium/appium-inspector/releases/download/v#{version}/Appium-Inspector-#{version}-mac-#{arch}.zip" name "Appium Inspector GUI" desc "GUI inspector for mobile apps" homepage "https://github.com/appium/appium-inspector/" # Not every GitHub release provides a file for macOS, so we check multiple # recent releases instead of only the "latest" release. livecheck do url :url regex(/^Appium.*?v?(\d+(?:\.\d+)+)[._-]mac[._-]#{arch}\.(?:dmg|pkg|zip)$/i) strategy :github_releases do |json, regex| json.map do |release| next if release["draft"] || release["prerelease"] release["assets"]&.map do |asset| match = asset["name"]&.match(regex) next if match.blank? match[1] end end.flatten end end app "Appium Inspector.app" zap trash: [ "~/Library/Application Support/appium-inspector", "~/Library/Logs/Appium Inspector", "~/Library/Preferences/io.appium.inspector.plist", "~/Library/Saved Application State/io.appium.inspector.savedState", ] end