diff options
| author | Paul Kmiec | 2011-07-28 16:15:56 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-03 20:15:55 -0800 |
| commit | a548dec1f30b79032fb783dd9654f13be2dce691 (patch) | |
| tree | 49819b4ffe59f5aaf1a29313c7aaf267bc9ef317 /Library/Formula/selenium-server-standalone.rb | |
| parent | 601d478587063fcc32e1c96151d2173e291052e0 (diff) | |
| download | homebrew-a548dec1f30b79032fb783dd9654f13be2dce691.tar.bz2 | |
selenium-server-standalone 2.16.1
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/selenium-server-standalone.rb')
| -rw-r--r-- | Library/Formula/selenium-server-standalone.rb | 61 |
1 files changed, 61 insertions, 0 deletions
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 +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>#{plist_name}</string> + <key>RunAtLoad</key> + <true/> + <key>KeepAlive</key> + <false/> + <key>ProgramArguments</key> + <array> + <string>/usr/bin/java</string> + <string>-jar</string> + <string>#{prefix}/selenium-server-standalone-2.16.1.jar</string> + <string>-port</string> + <string>4444</string> + </array> + <key>ServiceDescription</key> + <string>Selenium Server</string> + <key>StandardErrorPath</key> + <string>/var/log/selenium/selenium-error.log</string> + <key>StandardOutPath</key> + <string>/var/log/selenium/selenium-output.log</string> +</dict> +</plist> + EOS + end +end |
