From a548dec1f30b79032fb783dd9654f13be2dce691 Mon Sep 17 00:00:00 2001 From: Paul Kmiec Date: Thu, 28 Jul 2011 16:15:56 -0700 Subject: selenium-server-standalone 2.16.1 Signed-off-by: Adam Vandenberg --- Library/Formula/selenium-server-standalone.rb | 61 +++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Library/Formula/selenium-server-standalone.rb (limited to 'Library') diff --git a/Library/Formula/selenium-server-standalone.rb b/Library/Formula/selenium-server-standalone.rb new file mode 100644 index 000000000..276cdb6a5 --- /dev/null +++ b/Library/Formula/selenium-server-standalone.rb @@ -0,0 +1,61 @@ +require 'formula' + +class SeleniumServerStandalone < Formula + url 'http://selenium.googlecode.com/files/selenium-server-standalone-2.16.1.jar' + homepage 'http://seleniumhq.org/' + md5 'ce6e50d8c9114ffea5f712b93e088e5f' + + def install + prefix.install "selenium-server-standalone-2.16.1.jar" + plist_path.write startup_plist + plist_path.chmod 0644 + end + + def caveats; <<-EOS + You can enable selenium-server to automatically load on login with: + + mkdir -p ~/Library/LaunchAgents + cp "#{plist_path}" ~/Library/LaunchAgents/ + launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename} + + If this is an upgrade and you already have the #{plist_path} loaded: + launchctl unload -w ~/Library/LaunchAgents/#{plist_path.basename} + cp #{plist_path} ~/Library/LaunchAgents/ + launchctl load -w ~/Library/LaunchAgents/#{plist_path.basename} + + Or start it manually with: + java -jar #{prefix}/selenium-server-standalone-2.16.1.jar -p 4444 + EOS + end + + def startup_plist + return <<-EOS + + + + + Label + #{plist_name} + RunAtLoad + + KeepAlive + + ProgramArguments + + /usr/bin/java + -jar + #{prefix}/selenium-server-standalone-2.16.1.jar + -port + 4444 + + ServiceDescription + Selenium Server + StandardErrorPath + /var/log/selenium/selenium-error.log + StandardOutPath + /var/log/selenium/selenium-output.log + + + EOS + end +end -- cgit v1.2.3