cask "reqable" do arch arm: "arm64", intel: "x86_64" version "2.33.12" sha256 arm: "96907f5524f0a80d60729816f4027d1f90cebbd4179a1dc9914d8a67e72ace64", intel: "a5b51cbea36141e4d0bd55b37d1c3198d6665787d311e3afe073938b1f3c826c" url "https://github.com/reqable/reqable-app/releases/download/#{version}/reqable-app-macos-#{arch}.dmg", verified: "github.com/reqable/reqable-app/" name "Reqable" desc "Advanced API Debugging Proxy" homepage "https://reqable.com/" auto_updates true depends_on macos: ">= :catalina" 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