cask "ngrok" do arch arm: "arm64", intel: "amd64" on_arm do version "3.23.3,bwQ25LiJJwv,a" sha256 "8e1dc9aa66776826e416e3e324103388096ace0ccb73419df3dd6c082b82c75c" end on_intel do version "3.23.3,9D9ccRbaT84,a" sha256 "9f5c1405c7b9034bd59bfd042747609087b1ac79a670d85b961991a627a82842" end url "https://bin.equinox.io/#{version.csv.third}/#{version.csv.second}/ngrok-v#{version.major}-#{version.csv.first}-darwin-#{arch}.zip", verified: "bin.equinox.io/" name "ngrok" desc "Reverse proxy, secure introspectable tunnels to localhost" homepage "https://ngrok.com/" livecheck do url "https://dl.equinox.io/ngrok/ngrok-v#{version.major}/stable/archive" regex(%r{href=.*?/([^/]+)/([^/]+)/ngrok[._-]v#{version.major}[._-]v?(\d+(?:\.\d+)+)[._-]darwin[._-]#{arch}\.zip}i) strategy :page_match do |page, regex| page.scan(regex).map { |match| "#{match[2]},#{match[1]},#{match[0]}" } end end binary "ngrok" postflight do set_permissions "#{staged_path}/ngrok", "0755" end zap trash: [ "~/.ngrok#{version.major}", "~/Library/Application Support/ngrok", ] caveats <<~EOS To install shell completions, add this to your profile: if command -v ngrok &>/dev/null; then eval "$(ngrok completion)" fi EOS end