Files
homebrew-cask/Casks/r/reqable.rb
2023-10-12 07:38:54 -04:00

39 lines
1.1 KiB
Ruby

cask "reqable" do
arch arm: "arm64", intel: "x86_64"
version "1.6.2"
sha256 arm: "0347bf936dc9ac0e1d3df57960d6bdba27728b017dceb79b6b6835ee41ac7811",
intel: "06324a5b3341e68c5b34067a74acf9975d948162f58a0131848989c743b1ffee"
url "https://api.reqable.com/download?platform=macos&arch=#{arch}"
name "Reqable"
desc "Advanced API Debugging Proxy"
homepage "https://reqable.com/"
livecheck do
url "https://api.reqable.com/version/appcast?platform=macos&arch=#{arch}&locale=en-US"
strategy :sparkle, &:short_version
end
auto_updates true
app "Reqable.app"
uninstall_postflight do
stdout, * = system_command "/usr/bin/security",
args: ["find-certificate", "-a", "-c", "Reqable Proxy", "-Z"],
sudo: true
hashes = stdout.lines.grep(/^SHA-256 hash:/) { |l| l.split(":").second.strip }
hashes.each do |h|
system_command "/usr/bin/security",
args: ["delete-certificate", "-Z", h],
sudo: true
end
end
zap trash: [
"~/Library/Caches/Reqable",
"~/Library/Preferences/com.reqable.macosx.plist",
]
end