language: ruby
before_install:
  - gem update --system
  - gem update bundler
  - gem cleanup bundler
install: "bundle install --jobs 8"
rvm:
  - 1.9.3
  - 2.2.2
  - 2.4.1
  # - ruby-head
gemfile:
  - gemfiles/rails42.gemfile
  - gemfiles/rails50.gemfile
  - gemfiles/rails51.gemfile
matrix:
  include:
    - rvm: 1.9.3
      gemfile: gemfiles/rails42.gemfile
    - rvm: 2.2.2
      gemfile: gemfiles/rails50.gemfile
    - rvm: 2.4.1
      gemfile: gemfiles/rails51.gemfile
  #   - rvm: ruby-head
  #     gemfile: gemfiles/rails51.gemfile
  # allow_failures:
  #   - rvm: ruby-head
  #     gemfile: gemfiles/rails51.gemfile
  fast_finish: true
script:
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rspec

language: ruby
before_install:
  - gem update --system
  - gem update bundler
  - gem cleanup bundler
install: "bundle install --jobs 8"
rvm:
  - 1.9.3
  - 2.2.2
  - 2.4.1
  - ruby-head
gemfile:
  - gemfiles/rails42.gemfile
  - gemfiles/rails50.gemfile
  - gemfiles/rails51.gemfile
matrix:
  exclude:
    - rvm: 1.9.3
      gemfile: gemfiles/rails50.gemfile
    - rvm: 1.9.3
      gemfile: gemfiles/rails51.gemfile
  allow_failures:
    - rvm: ruby-head
  fast_finish: true
script:
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rspec

Exclude only ruby-1.9.3 & rails > 5
Exclude only ruby-1.9.3 & rails > 5
