language: ruby
cache: bundler
sudo: false
env:
  - "DB=postgresql"
before_script:
  - "cp ./config/database.yml.travis ./config/database.yml"
  - "bundle exec rake db:setup"
rvm:
  - 2.2.0
script:
  - "bundle exec rake spec"
  - "bundle exec rake spec:javascript"

language: ruby
cache: bundler
sudo: false
env:
  - "DB=postgresql"
before_script:
  - "cp ./config/database.yml.travis ./config/database.yml"
  - "bundle exec rake db:setup"
rvm:
  - 2.2.0
script:
  - "bundle exec rake spec"
  - "bundle exec rake spec:javascript"

# Use phantomjs 2.1.1, https://github.com/travis-ci/travis-ci/issues/3225
cache:
  directories:
    - "travis_phantomjs"

before_install:
  - "phantomjs --version"
  - "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
  - "phantomjs --version"
  - "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
  - "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
  - "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
  - "phantomjs --version"

Update phantomjs to 2.1.1 on Travis CI
Update phantomjs to 2.1.1 on Travis CI
