cask "reqable" do arch arm: "arm64", intel: "x86_64" version "2.3.2" sha256 arm: "4f57b2ed0a91637f976f37fb36ec030426e25433d1ae0a79faac090324e157b6", intel: "39ba1ed048c01aa0adf8415c96e83b49e88ed08a97b52c447f2901fd673c2b95" 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