class SeleniumServerStandaloneAT245 < Formula desc "Automated Browser Control" homepage "http://seleniumhq.org/" url "https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar" sha256 "1172dfa2d94b43bcbcd9e85c824fd714f2d1ed411b6919a22e7338879fad757b" bottle do cellar :any_skip_relocation sha256 "9e2bc170430f8ff6705f135edbf2727d8362d8b5e2d953ed05d255829c6fafb0" => :sierra sha256 "9e2bc170430f8ff6705f135edbf2727d8362d8b5e2d953ed05d255829c6fafb0" => :el_capitan sha256 "9e2bc170430f8ff6705f135edbf2727d8362d8b5e2d953ed05d255829c6fafb0" => :yosemite end def install libexec.install "selenium-server-standalone-2.45.0.jar" bin.write_jar_script libexec/"selenium-server-standalone-2.45.0.jar", "selenium-server" end plist_options :manual => "selenium-server -p 4444" def plist; <<-EOS.undent Label #{plist_name} RunAtLoad KeepAlive ProgramArguments /usr/bin/java -jar #{libexec}/selenium-server-standalone-2.45.0.jar -port 4444 ServiceDescription Selenium Server StandardErrorPath #{var}/log/selenium-error.log StandardOutPath #{var}/log/selenium-output.log EOS end test do selenium_version = shell_output("unzip -p #{libexec}/selenium-server-standalone-#{version}.jar META-INF/MANIFEST.MF | sed -nEe '/Selenium-Version:/p'") assert_equal "Selenium-Version: #{version}", selenium_version.strip end end