language: ruby

cache: bundler

rvm:
  - 2.4.1
  - 2.3.3
  - 2.2.6

sudo: false

services: mongodb

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

branches:
  only:
    - "master"

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=4.2.8"
  - "RAILS_VERSION=4.2.8 DATABASE_URL=mysql2://root@localhost/statesman_test"
  - "RAILS_VERSION=4.2.8 DATABASE_URL=postgres://postgres@localhost/statesman_test"
  - "RAILS_VERSION=5.0.3 EXCLUDE_MONGOID=true"

matrix:
  exclude: []
language: ruby

cache: bundler

rvm:
  - 2.4.1
  - 2.3.3
  - 2.2.6

sudo: false

services: mongodb

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

branches:
  only:
    - "master"

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=4.2.9"
  - "RAILS_VERSION=4.2.9 DATABASE_URL=mysql2://root@localhost/statesman_test"
  - "RAILS_VERSION=4.2.9 DATABASE_URL=postgres://postgres@localhost/statesman_test"
  - "RAILS_VERSION=5.0.5 EXCLUDE_MONGOID=true"
  - "RAILS_VERSION=5.1.3 EXCLUDE_MONGOID=true"

matrix:
  exclude: []

Add test case for rails 5.1 in CI
Add test case for rails 5.1 in CI
