aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/selenium-server-standalone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/selenium-server-standalone.rb')
-rw-r--r--Library/Formula/selenium-server-standalone.rb72
1 files changed, 28 insertions, 44 deletions
diff --git a/Library/Formula/selenium-server-standalone.rb b/Library/Formula/selenium-server-standalone.rb
index e0c6476eb..c40889b23 100644
--- a/Library/Formula/selenium-server-standalone.rb
+++ b/Library/Formula/selenium-server-standalone.rb
@@ -9,51 +9,35 @@ class SeleniumServerStandalone < Formula
prefix.install "selenium-server-standalone-#{version}.jar"
end
- def caveats; <<-EOS
- You can enable selenium-server to automatically load on login with:
+ plist_options :manual => "java -jar #{HOMEBREW_PREFIX}/opt/selenium-server-standalone/selenium-server-standalone-#{version}.jar -p 4444"
- 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.basename} 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-#{version}.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-#{version}.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>
+ def plist; <<-EOS.undent
+ <?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-#{version}.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