cask "apipost" do arch arm: "arm64", intel: "x64" version "8.1.18" sha256 arm: "df075f38cf1ae9614dd4d669dfbf3caac5f063338515a24eb7d881b908866bfc", intel: "8ce99a1b239ad64509d6859c2fc2204ee628da7091e9f2f17e0758d6631fca80" url "https://www.apipost.cn/dl.php?client=Mac&arch=#{arch}&version=#{version}" name "Apipost" desc "Platform for API documentation, debugging, Mock and testing" homepage "https://www.apipost.cn/" livecheck do url :homepage regex(/href=.*client=Mac&arch=#{arch}&version=(\d+(?:\.\d+)+)[<" ]/i) end auto_updates true depends_on macos: ">= :high_sierra" app "ApiPost.app" zap trash: [ "~/Library/Application Support/ApiPost#{version.major}", "~/Library/Logs/ApiPost#{version.major}", "~/Library/Preferences/com.apipost.apipost.fe.desctop.cn.#{version.major}.x.plist", "~/Library/Saved Application State/com.apipost.apipost.fe.desctop.cn.#{version.major}.x.savedState", ] end