language: ruby
rvm:
  - 2.3.0

before_install:
  - npm install
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - bundle exec rails server -p 3000 &
  - sleep 5

script:
  - bundle exec rake
  - node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
  - node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox

notifications:
  email: false

language: ruby
rvm:
  - 2.3.0

env:
  - TRAVIS_NODE_VERSION="4"

before_install:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - bundle exec rails server -p 3000 &
  - sleep 5

install:
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
  - npm install

script:
  - bundle exec rake
  - node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
  - node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox

notifications:
  email: false

Use Node v4 in Travis required by Protractor 3
Use Node v4 in Travis required by Protractor 3
