homebrew-cask/Casks/apipost.rb

30 lines
974 B
Ruby

cask "apipost" do
arch arm: "arm64", intel: "x64"
version "7.0.15"
sha256 arm: "29976f5ad455e9458bb696fe559b253aa8a9034c4cda0e1d4a7264f90372eed3",
intel: "8a5d13e58896b6b3a0e478bab6d8f67c4183705784044ee374491737ab84871a"
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: ">= :big_sur"
app "ApiPost#{version.major}.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