class Wai < Formula desc "WAI, an open media standard: its command line, and a local relay and room service" homepage "https://wai.transaction.science/docs/quickstart/" version "0.3.0" license "Apache-2.0" on_macos do on_arm do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.3.0/wai-0.3.0-aarch64-apple-darwin.tar.gz" sha256 "fa99739393e482d6607111829956ff4933ab73d63e21f9501a0112a839bd81be" end on_intel do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.3.0/wai-0.3.0-x86_64-apple-darwin.tar.gz" sha256 "ddb1842c2fd171457eadd92ea6f344bd3319a211d9953c17fa8fbf0470e783e1" end end on_linux do on_arm do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.3.0/wai-0.3.0-aarch64-unknown-linux-musl.tar.gz" sha256 "38764e4257f85e249f95b0775f3dbf9544dc3b9ebd57b53b088b61e8d6f94c05" end on_intel do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.3.0/wai-0.3.0-x86_64-unknown-linux-musl.tar.gz" sha256 "13c2c62182644604bd80fd83688551a39b038810f6dcc12bab7422478291c8cc" end end def install # bin/ and share/wai/web/ side by side: `wai dev` finds the relay, the room service and the # room client beside its own binary. bin.install Dir["bin/*"] (share/"wai").install "share/wai/web" end test do assert_match "video-room", shell_output("#{bin}/wai create --list") assert_match "delivered-verified", shell_output("#{bin}/wai hello #{testpath}/hello") assert_match "verified", shell_output("#{bin}/wai verify #{testpath}/hello") end end