sudo: false
dist: trusty
language: ruby
cache: bundler
rvm:
  - ruby-head
  - 2.6.3
  - 2.5.5
  - 2.4.6
  - 2.3.8
  - 2.2.10
  - 2.1.10
  - 2.0.0
  - jruby-9.2.7.0
  - rbx-3
gemfile:
  - test/gemfiles/Gemfile.rails-6.0.x
  - test/gemfiles/Gemfile.rails-5.2.x
  - test/gemfiles/Gemfile.rails-5.1.x
  - test/gemfiles/Gemfile.rails-5.0.x
  - test/gemfiles/Gemfile.rails-5.0.x.erubi
  - test/gemfiles/Gemfile.rails-4.2.x
  - test/gemfiles/Gemfile.rails-4.1.x
  - test/gemfiles/Gemfile.rails-4.0.x
matrix:
  exclude:
    - rvm: 2.0.0
      gemfile: test/gemfiles/Gemfile.rails-6.0.x
    - rvm: 2.1.10
      gemfile: test/gemfiles/Gemfile.rails-6.0.x
    - rvm: 2.2.10
      gemfile: test/gemfiles/Gemfile.rails-6.0.x
    - rvm: 2.3.8
      gemfile: test/gemfiles/Gemfile.rails-6.0.x
    - rvm: 2.4.6
      gemfile: test/gemfiles/Gemfile.rails-6.0.x
    - rvm: 2.0.0
      gemfile: test/gemfiles/Gemfile.rails-5.2.x
    - rvm: 2.1.10
      gemfile: test/gemfiles/Gemfile.rails-5.2.x
    - rvm: 2.0.0
      gemfile: test/gemfiles/Gemfile.rails-5.1.x
    - rvm: 2.1.10
      gemfile: test/gemfiles/Gemfile.rails-5.1.x
    - rvm: 2.0.0
      gemfile: test/gemfiles/Gemfile.rails-5.0.x
    - rvm: 2.0.0
      gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
    - rvm: 2.1.10
      gemfile: test/gemfiles/Gemfile.rails-5.0.x
    - rvm: 2.1.10
      gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
    - rvm: 2.4.6
      gemfile: test/gemfiles/Gemfile.rails-4.0.x
    - rvm: 2.4.6
      gemfile: test/gemfiles/Gemfile.rails-4.1.x
    - rvm: 2.4.6
      gemfile: test/gemfiles/Gemfile.rails-4.2.x
    - rvm: 2.5.5
      gemfile: test/gemfiles/Gemfile.rails-4.0.x
    - rvm: 2.5.5
      gemfile: test/gemfiles/Gemfile.rails-4.1.x
    - rvm: 2.5.5
      gemfile: test/gemfiles/Gemfile.rails-4.2.x
    - rvm: 2.6.3
      gemfile: test/gemfiles/Gemfile.rails-4.0.x
    - rvm: 2.6.3
      gemfile: test/gemfiles/Gemfile.rails-4.1.x
    - rvm: 2.6.3
      gemfile: test/gemfiles/Gemfile.rails-4.2.x
    - rvm: ruby-head
      gemfile: test/gemfiles/Gemfile.rails-4.0.x
    - rvm: ruby-head
      gemfile: test/gemfiles/Gemfile.rails-4.1.x
    - rvm: ruby-head
      gemfile: test/gemfiles/Gemfile.rails-4.2.x
  include:
    - rvm: 2.6.3
      gemfile: test/gemfiles/Gemfile.rails-edge
  allow_failures:
    - rvm: ruby-head
    - rvm: rbx-3
    - gemfile: test/gemfiles/Gemfile.rails-edge
    - rvm: jruby-9.2.7.0
      gemfile: test/gemfiles/Gemfile.rails-4.2.x
    - rvm: jruby-9.2.7.0
      gemfile: test/gemfiles/Gemfile.rails-4.1.x
    - rvm: jruby-9.2.7.0
      gemfile: test/gemfiles/Gemfile.rails-4.0.x
    - rvm: jruby-9.2.7.0
      gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
  fast_finish: true
before_install:
  - gem i rubygems-update -v '<3' && update_rubygems # https://github.com/travis-ci/travis-ci/issues/8974
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
  - gem i bundler -v '<2'
script: "bundle exec rake submodules test"
