30 lines
900 B
Ruby
30 lines
900 B
Ruby
require "language/node"
|
|
|
|
class Whistle < Formula
|
|
desc "HTTP, HTTP2, HTTPS, Websocket debugging proxy"
|
|
homepage "https://github.com/avwo/whistle"
|
|
url "https://registry.npmjs.org/whistle/-/whistle-2.9.33.tgz"
|
|
sha256 "ef206a4c1696a603812b6d370e25033ad2d5e93936efdf749d8f4d24c7027427"
|
|
license "MIT"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, all: "39816e628c4f118a834ae7f879d3c3b174aad79121065342d0137678ce593d02"
|
|
end
|
|
|
|
# `bin/proxy/mac/Whistle` was only built for `x86_64`
|
|
# upstream issue tracker, https://github.com/avwo/whistle/issues/734
|
|
depends_on arch: :x86_64
|
|
depends_on "node"
|
|
|
|
def install
|
|
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
end
|
|
|
|
test do
|
|
(testpath/"package.json").write('{"name": "test"}')
|
|
system bin/"whistle", "start"
|
|
system bin/"whistle", "stop"
|
|
end
|
|
end
|