language: ruby

# This is going to enable build on VMs instead of containers
sudo: required
dist: trusty

cache:
  bundler: true
  directories:
    - $HOME/.nvm/versions/node

rvm:
  - 2.2.5
  - 2.3.1

env:
  - "DB=postgresql"

addons:
  firefox: 45

before_install:
  - nvm install v6.7.0
  - node -v
  - npm -v
  - npm install -g phantomjs-prebuilt
  - phantomjs -v
  - firefox -v

before_script:
  - mv config/symmetric-encryption.travis config/symmetric-encryption.yml
  - bundle exec rake fulcrum:setup db:setup
  - bundle exec rails generate symmetric_encryption:new_keys test
  - phantomjs -v
  - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16

script:
  - "bundle exec rake travis"

language: ruby

# This is going to enable build on VMs instead of containers
sudo: required
dist: trusty

cache:
  bundler: true
  directories:
    - $HOME/.nvm/versions/node

rvm:
  - 2.2.5
  - 2.3.1

env:
  - "DB=postgresql"

addons:
  firefox: 45

before_install:
  - nvm install v6.7.0
  - node -v
  - npm -v
  - npm install -g phantomjs-prebuilt
  - phantomjs -v

before_script:
  - mv config/symmetric-encryption.travis config/symmetric-encryption.yml
  - bundle exec rake fulcrum:setup db:setup
  - bundle exec rails generate symmetric_encryption:new_keys test
  - phantomjs -v
  - firefox -v
  - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16

script:
  - "bundle exec rake travis"

Move firefox version to before_script on Travis CI config
Move firefox version to before_script on Travis CI config

With the new way of updating firefox, firefox is not available at
the before_install point.
