language: ruby

rvm:
  - 2.3.0
  - 2.2.4
  - 2.1
  - 2.0.0

sudo: false

services: mongodb

before_script:
  - mysql -e 'CREATE DATABASE statesman_test;'
  - psql -c 'CREATE DATABASE statesman_test;' -U postgres

script:
  - bundle exec rubocop
  - bundle exec rake

env:
  - "RAILS_VERSION=3.2.21"
  - "RAILS_VERSION=4.0.13"
  - "RAILS_VERSION=4.1.14"
  - "RAILS_VERSION=4.2.5"
  - "RAILS_VERSION=4.2.5 DATABASE_URL=mysql2://root@localhost/statesman_test"
  - "RAILS_VERSION=4.2.5 DATABASE_URL=postgres://postgres@localhost/statesman_test"
  - "RAILS_VERSION=5.0.0 EXCLUDE_MONGOID=true"

matrix:
  exclude:
    - rvm: 2.1
      env: "RAILS_VERSION=5.0.0 EXCLUDE_MONGOID=true"
    - rvm: 2.0.0
      env: "RAILS_VERSION=5.0.0 EXCLUDE_MONGOID=true"

language: ruby

rvm:
  - 2.3.3
  - 2.2.6
  - 2.1.9

sudo: false

services: mongodb

before_install:
 - gem update --system
 - gem install bundler

before_script:
  - mysql -e 'CREATE DATABASE statesman_test;'
  - psql -c 'CREATE DATABASE statesman_test;' -U postgres

script:
  - bundle exec rubocop
  - bundle exec rake

env:
  - "RAILS_VERSION=3.2.21"
  - "RAILS_VERSION=4.0.13"
  - "RAILS_VERSION=4.1.14"
  - "RAILS_VERSION=4.2.5"
  - "RAILS_VERSION=4.2.5 DATABASE_URL=mysql2://root@localhost/statesman_test"
  - "RAILS_VERSION=4.2.5 DATABASE_URL=postgres://postgres@localhost/statesman_test"
  - "RAILS_VERSION=5.0.0 EXCLUDE_MONGOID=true"

matrix:
  exclude:
    - rvm: 2.1.9
      env: "RAILS_VERSION=5.0.0 EXCLUDE_MONGOID=true"

Remove Ruby 2.0 support from CI
Remove Ruby 2.0 support from CI

Ruby 2.0 is no longer supported,
as of 24/Feb/2016. We therefore should
not be running CI against it, and not
endorse its usage. Users should
upgrade to at least Ruby 2.1 as soon as
possible.
