# In .travis.yml
gemfile:
  - gemfiles/rails_4.2.0.gemfile
  - gemfiles/rails_5.0.0.gemfile
  - gemfiles/rails_5.1.0.gemfile
  - gemfiles/rails_5.2.0.gemfile
  - gemfiles/rails_6.0.0.gemfile

language: ruby
rvm:
  - 2.2
  - 2.3
  - 2.4
  - 2.5
  - 2.6
matrix:
  exclude:
    - gemfile: gemfiles/rails_6.0.0.gemfile
      rvm: 2.2
    - gemfile: gemfiles/rails_6.0.0.gemfile
      rvm: 2.3
    - gemfile: gemfiles/rails_6.0.0.gemfile
      rvm: 2.4
    - gemfile: gemfiles/rails_4.2.0.gemfile
      rvm: 2.6

before_install:
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
  - gem install bundler -v '< 2'

script:
  - bundle exec rspec

# In .travis.yml
gemfile:
  - gemfiles/rails_4.2.0.gemfile
  - gemfiles/rails_5.0.0.gemfile
  - gemfiles/rails_5.1.0.gemfile
  - gemfiles/rails_5.2.0.gemfile
  - gemfiles/rails_6.0.0.gemfile

language: ruby
rvm:
  - 2.2
  - 2.3
  - 2.4
  - 2.5
  - 2.6
jobs:
  allow_failures:
    - gemfile: gemfiles/rails_5.2.0.gemfile
      rvm: 2.2
  exclude:
    - gemfile: gemfiles/rails_6.0.0.gemfile
      rvm: 2.2
    - gemfile: gemfiles/rails_6.0.0.gemfile
      rvm: 2.3
    - gemfile: gemfiles/rails_6.0.0.gemfile
      rvm: 2.4
    - gemfile: gemfiles/rails_4.2.0.gemfile
      rvm: 2.6
before_install:
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
  - gem install bundler -v '< 2'

script:
  - bundle exec rspec

Allow failures on Rails 5.2 running on Ruby 2.2
Allow failures on Rails 5.2 running on Ruby 2.2
