Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ language: ruby
sudo: required
addons:
chrome: stable
apt:
packages:
- dpkg
- chromium-chromedriver

# We deviate from the rspec-dev cache setting here.
#
Expand All @@ -29,14 +25,14 @@ cache: bundler
bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3"

before_install:
- script/install_chrome_driver
- script/update_rubygems_and_install_bundler
- script/clone_all_rspec_repos

before_script:
# Rails 4+ complains with a bundler rails binstub in PROJECT_ROOT/bin/
- rm -f bin/rails
- bundle exec rails --version
- ln -s /usr/lib/chromium-browser/chromedriver ~/bin/chromedriver

script: "script/run_build 2>&1"

Expand Down
12 changes: 12 additions & 0 deletions script/install_chrome_driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

CHROME_VERSION=$(google-chrome --version | grep -iE "[0-9.]{10,20}" | sed -E "s/.* ([0-9]+)\.[0-9]+\.[0-9]+\..*/\1/")
echo $CHROME_VERSION

LATEST=$(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
echo $LATEST

curl "https://chromedriver.storage.googleapis.com/$LATEST/chromedriver_linux64.zip" > chromedriver_linux64.zip

unzip chromedriver_linux64.zip
mv chromedriver ~/bin/chromedriver