language: ruby
cache: bundler

rvm:
  - 2.3.0
  - 2.2.0
  - 2.1.0
  - 2.0.0
  - jruby-9.0.4.0

env:
  - DB=postgres
  - DB=mysql

gemfile:
  - gemfiles/Gemfile.rails-4.0.rb
  - gemfiles/Gemfile.rails-4.1.rb
  - gemfiles/Gemfile.rails-4.2.rb
  - gemfiles/Gemfile.rails-5.0.rb

matrix:
  allow_failures:
    - rvm: jruby-19mode
      gemfile: gemfiles/Gemfile.rails-4.2.rb
      env: DB=postgres

sudo: false

before_script:
  - bundle exec rake db:create db:up

script: 'COVERALLS=true bundle exec rake test'

language: ruby
cache: bundler

rvm:
  - 2.3.0
  - 2.2.0
  - 2.1.0
  - 2.0.0
  - jruby-9.0.4.0

env:
  - DB=postgres
  - DB=mysql

gemfile:
  - gemfiles/Gemfile.rails-4.0.rb
  - gemfiles/Gemfile.rails-4.1.rb
  - gemfiles/Gemfile.rails-4.2.rb
  - gemfiles/Gemfile.rails-5.0.rb

matrix:
  allow_failures:
    - rvm: jruby-19mode
      gemfile: gemfiles/Gemfile.rails-4.2.rb
      env: DB=postgres
  exclude:
    - rvm: 2.0.0
      gemfile: gemfiles/Gemfile.rails-5.0.rb
    - rvm: 2.1.0
      gemfile: gemfiles/Gemfile.rails-5.0.rb
    - rvm: 2.2.0
      gemfile: gemfiles/Gemfile.rails-5.0.rb

sudo: false

before_script:
  - bundle exec rake db:create db:up

script: 'COVERALLS=true bundle exec rake test'

Exclude rails 5 gemfile for ruby < 2.2.2
Exclude rails 5 gemfile for ruby < 2.2.2

* Rails 5 only supports ruby 2.2.2 and up. Don't use Gemfile.rails-5.0.rb with
older unsupported versions
