1class Devsite < Formula2 desc "Share public work and reach local TCP services"3 homepage "https://dev.site"4 url "https://github.com/FelineStateMachine/devsite/releases/download/v0.6.1/devsite-v0.6.1-aarch64-apple-darwin.tar.gz"5 sha256 "42cc27a1a4b36601efe71ce2db1813340171e86b457765fad43071c6f421d532"6 license "Apache-2.0"78 depends_on arch: :arm649 depends_on :macos1011 def install12 bin.install "devsite"13 end1415 service do16 run [opt_bin/"devsite", "daemon", "run"]17 keep_alive true18 log_path var/"log/devsite.log"19 error_log_path var/"log/devsite.log"20 end2122 test do23 assert_match(/^devsite \d+\.\d+\.\d+$/, shell_output("#{bin}/devsite --version").strip)24 assert_match "status", shell_output("#{bin}/devsite daemon --help")25 output = shell_output("DEVSITE_HOME=#{testpath}/home #{bin}/devsite --json status")26 assert_match '"command":"status"', output27 assert_match '"ok":true', output28 end29end