class LaunchSocketServer < Formula desc "Bind to privileged ports without running a server as root" homepage "https://github.com/mistydemeo/launch_socket_server" url "https://github.com/mistydemeo/launch_socket_server/archive/v2.0.0.tar.gz" sha256 "507184544d170dab63e6112198212033aaa84edf0e092c1dfe641087f092f365" head "https://github.com/mistydemeo/launch_socket_server.git" depends_on "go" => :build def install system "make", "install", "PREFIX=#{prefix}" end plist_options :startup => true def plist <<~EOS Label #{plist_name} RunAtLoad KeepAlive ProgramArguments #{opt_sbin}/launch_socket_server - Sockets Socket SockNodeName 0.0.0.0 SockServiceName 80 EnvironmentVariables LAUNCH_PROGRAM_TCP_ADDRESS 127.0.0.1:8080 StandardErrorPath #{var}/log/launch_socket_server.log StandardOutPath #{var}/log/launch_socket_server.log EOS end test do assert_includes shell_output("#{opt_sbin}/launch_socket_server 2>&1; true"), "usage: #{opt_sbin}/launch_socket_server" end end