language: ruby
cache:
  bundler: true
  directories:
    - reports

rvm:
  - 2.2.3

services:
  - redis-server

sudo: false

bundler_args: --jobs=3 --retry=3 --without development

git:
  submodules: false

before_install:
  - git submodule update --init --depth 1
  - sh -c "if [ '$RUBYGEMS_VERSION' != 'latest' ]; then gem update --system $RUBYGEMS_VERSION; fi"
  - gem --version
  - script/install_toxiproxy.sh

before_script:
  - cp config/database.yml.example config/database.yml
  - bundle exec rake db:create db:migrate db:test:prepare

script:
  - bundle exec rake
  - bundle exec rake rubocop
  - script/brakeman

env:
  - RUBYGEMS_VERSION=2.4.5
  - RUBYGEMS_VERSION=latest

matrix:
  allow_failures:
    - env: "RUBYGEMS_VERSION=latest"
    - rvm: ruby-head
  fast_finish: true

language: ruby
cache:
  bundler: true
  directories:
    - reports

rvm:
  - 2.2.3
  - ruby-head

services:
  - redis-server

sudo: false

bundler_args: --jobs=3 --retry=3 --without development

git:
  submodules: false

before_install:
  - git submodule update --init --depth 1
  - sh -c "if [ '$RUBYGEMS_VERSION' != 'latest' ]; then gem update --system $RUBYGEMS_VERSION; fi"
  - gem --version
  - script/install_toxiproxy.sh

before_script:
  - cp config/database.yml.example config/database.yml
  - bundle exec rake db:create db:migrate db:test:prepare

script:
  - bundle exec rake
  - bundle exec rake rubocop
  - script/brakeman

env:
  - RUBYGEMS_VERSION=2.4.5
  - RUBYGEMS_VERSION=latest

matrix:
  allow_failures:
    - env: "RUBYGEMS_VERSION=latest"
    - rvm: ruby-head
  fast_finish: true

Revert "stop testing ruby-head since it never works"
Revert "stop testing ruby-head since it never works"

As @sferik pointed out, and I agree. Having the ruby-head on travis
doesnt cost anything if is on the allow_failure.

Also, we can watch that, and upgrade to new ruby versions sooner, if it
is green for a while already.

[re #1086]
