language: ruby
rvm:
  - 2.2.9
  - 2.3.6
  - 2.4.3
  - 2.5.0
gemfile:
  - gemfiles/rails_5_2.gemfile
  - gemfiles/rails_5_1.gemfile
  - gemfiles/rails_5_0.gemfile
  - gemfiles/rails_4_2.gemfile
  - gemfiles/rails_4_1.gemfile
  - gemfiles/rails_4_0.gemfile
matrix:
  exclude:
    - rvm: 2.4.3
      gemfile: gemfiles/rails_4_0.gemfile
    - rvm: 2.4.3
      gemfile: gemfiles/rails_4_1.gemfile
before_install: gem update bundler
sudo: false
env:
  - DB=sqlite
  - DB=mysql
  - DB=postgres
before_script:
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS unread_test;'; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database unread_test;' -U postgres; fi"

language: ruby
rvm:
  - 2.2.9
  - 2.3.6
  - 2.4.3
  - 2.5.0
gemfile:
  - gemfiles/rails_5_2.gemfile
  - gemfiles/rails_5_1.gemfile
  - gemfiles/rails_5_0.gemfile
  - gemfiles/rails_4_2.gemfile
  - gemfiles/rails_4_1.gemfile
  - gemfiles/rails_4_0.gemfile
matrix:
  exclude:
    - rvm: 2.4.3
      gemfile: gemfiles/rails_4_0.gemfile
    - rvm: 2.4.3
      gemfile: gemfiles/rails_4_1.gemfile
before_install: gem update bundler
sudo: false
env:
  - DB=sqlite
  - DB=mysql
  - DB=postgres
before_script:
  - gem update --system # https://github.com/travis-ci/travis-ci/issues/8978
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS unread_test;'; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database unread_test;' -U postgres; fi"

Fix Ruby 2.5.0 build failure
Travis: Fix Ruby 2.5.0 build failure

RubyGems 2.7.4 is required
https://github.com/travis-ci/travis-ci/issues/8978
