language: ruby
rvm:
  - 1.8.7
  - 1.9.3
  - 2.2.2

env:
  - "CATCH_ALL_ROUTE=true"
  - "DB=mysql"
  - "DB=postgresql"
  - "DB=sqlite"
  - "RAILS_VERSION=3-1-stable"
  - "RAILS_VERSION=3-2-stable"
  - "RAILS_VERSION=4-0-stable"
  - "RAILS_VERSION=master"

# before_install:
#   - gem update --system 2.1.11
#   - gem --version

before_script:
  - mysql -e 'create database rails_db_info_test;'
  - psql -c 'create database rails_db_info_test;' -U postgres

script:
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rake

matrix:
  exclude:
    - rvm: 1.8.7
      env: "CATCH_ALL_ROUTE=true"
    - rvm: 1.8.7
      env: "DB=mysql"
    - rvm: 1.8.7
      env: "DB=postgresql"
    - rvm: 1.8.7
      env: "DB=sqlite"
    - rvm: 1.8.7
      env: "RAILS_VERSION=4-0-stable"
    - rvm: 1.8.7
      env: "RAILS_VERSION=master"

language: ruby
rvm:
  - 1.8.7
  - 1.9.3
  - 2.2.2

env:
  - "CATCH_ALL_ROUTE=true"
  - "DB=mysql"
  - "DB=postgresql"
  - "DB=sqlite"
  - "RAILS_VERSION=3-1-stable"
  - "RAILS_VERSION=3-2-stable"
  - "RAILS_VERSION=4-0-stable"
  - "RAILS_VERSION=4-1-stable"
  - "RAILS_VERSION=4-2-stable"

# before_install:
#   - gem update --system 2.1.11
#   - gem --version

before_script:
  - mysql -e 'create database rails_db_info_test;'
  - psql -c 'create database rails_db_info_test;' -U postgres

script:
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rake

matrix:
  exclude:
    - rvm: 1.8.7
      env: "CATCH_ALL_ROUTE=true"
    - rvm: 1.8.7
      env: "DB=mysql"
    - rvm: 1.8.7
      env: "DB=postgresql"
    - rvm: 1.8.7
      env: "DB=sqlite"
    - rvm: 1.8.7
      env: "RAILS_VERSION=4-0-stable"
    - rvm: 1.8.7
      env: "RAILS_VERSION=master"

Test only with stable versions on CI
Test only with stable versions on CI
