excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / a / appium-inspector.rb
blob623e4fba9e521b4629ffa7c74bf35be1539d2ad6
1 cask "appium-inspector" do
2   arch arm: "arm64", intel: "x64"
4   version "2024.9.1"
5   sha256 arm:   "3bf437adb450ad8d4e29f400e0282d59bfc15afdf8b664aad8d91fdff8abae9c",
6          intel: "541f5a9e2b747e639acd73ae1545b75555a7709b26756082b92a49df636e6655"
8   url "https://github.com/appium/appium-inspector/releases/download/v#{version}/Appium-Inspector-#{version}-mac-#{arch}.zip"
9   name "Appium Inspector GUI"
10   desc "GUI inspector for mobile apps"
11   homepage "https://github.com/appium/appium-inspector/"
13   # Not every GitHub release provides a file for macOS, so we check multiple
14   # recent releases instead of only the "latest" release.
15   livecheck do
16     url :url
17     regex(/^Appium.*?v?(\d+(?:\.\d+)+)[._-]mac[._-]#{arch}\.(?:dmg|pkg|zip)$/i)
18     strategy :github_releases do |json, regex|
19       json.map do |release|
20         next if release["draft"] || release["prerelease"]
22         release["assets"]&.map do |asset|
23           match = asset["name"]&.match(regex)
24           next if match.blank?
26           match[1]
27         end
28       end.flatten
29     end
30   end
32   app "Appium Inspector.app"
34   zap trash: [
35     "~/Library/Application Support/appium-inspector",
36     "~/Library/Logs/Appium Inspector",
37     "~/Library/Preferences/io.appium.inspector.plist",
38     "~/Library/Saved Application State/io.appium.inspector.savedState",
39   ]
40 end