ca58fdb3e4
Update chromedriver from 2.15 to 2.16 Closes Homebrew/homebrew#40555. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
47 lines
1.4 KiB
Ruby
47 lines
1.4 KiB
Ruby
class Chromedriver < Formula
|
|
desc "Tool for automated testing of webapps across many browsers"
|
|
homepage "https://sites.google.com/a/chromium.org/chromedriver/"
|
|
url "https://chromedriver.storage.googleapis.com/2.16/chromedriver_mac32.zip"
|
|
sha256 "2e4eb9e7bf884d735d08275fb3d9f9e2474c370f11ed02753d0ae4e61cc07a0c"
|
|
version "2.16"
|
|
|
|
def install
|
|
bin.install "chromedriver"
|
|
end
|
|
|
|
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>homebrew.mxcl.chromedriver</string>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<false/>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/chromedriver</string>
|
|
</array>
|
|
<key>ServiceDescription</key>
|
|
<string>Chrome Driver</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>#{var}/log/chromedriver-error.log</string>
|
|
<key>StandardOutPath</key>
|
|
<string>#{var}/log/chromedriver-output.log</string>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
driver = fork do
|
|
system bin/"chromedriver",
|
|
"--port=9999", "--log-path=#{testpath}/cd.log"
|
|
end
|
|
sleep 5
|
|
Process.kill("TERM", driver)
|
|
File.exist? testpath/"cd.log"
|
|
end
|
|
end
|