homebrew-core/Formula/apibuilder-cli.rb
2018-05-25 17:23:23 -07:00

23 lines
698 B
Ruby

class ApibuilderCli < Formula
desc "Command-line interface to generate clients for api builder"
homepage "https://www.apibuilder.io"
url "https://github.com/apicollective/apibuilder-cli/archive/0.1.31.tar.gz"
sha256 "4ef95aa8a819760a230d5f21eacb33730234f7827c9081eec9babacb55008058"
bottle :unneeded
def install
system "./install.sh", prefix
end
test do
(testpath/"config").write <<~EOS
[default]
token = abcd1234
EOS
assert_match "Profile default:",
shell_output("#{bin}/read-config --path config")
assert_match "Could not find apibuilder configuration directory",
shell_output("#{bin}/apibuilder", 1)
end
end