language: ruby
sudo: false
env:
  global: 
    - JRUBY_OPTS=--2.0
  matrix:
    - DB=
    - DB=sqlite
    - DB=sqlite USE_SQLITE_EXT=1
    - DB=postgres
    - DB=mysql
rvm:
  - 1.9.3
  - 2.0.0
  - 2.1.2
  - 2.2.2
  - 2.3.0
  - jruby-19mode
gemfile:
  - Gemfile
  - gemfiles/Gemfile.ruby1.9.3
  - gemfiles/Gemfile.rails3.2
  - gemfiles/Gemfile.rails4.1
  - gemfiles/Gemfile.rails5.0
before_install:
  - which bundle >/dev/null 2>&1 || gem install bundler
matrix:
  exclude:
    - rvm: 1.9.3
      gemfile: Gemfile
    - rvm: 1.9.3
      gemfile: gemfiles/Gemfile.rails3.2
    - rvm: 1.9.3
      gemfile: gemfiles/Gemfile.rails4.1
    - rvm: 1.9.3
      gemfile: gemfiles/Gemfile.rails5.0
    - env: DB=
      gemfile: gemfiles/Gemfile.rails3.2
    - env: DB=
      gemfile: gemfiles/Gemfile.rails4.1
    - env: DB=
      gemfile: gemfiles/Gemfile.rails5.0
    - rvm: 2.0.0
      gemfile: gemfiles/Gemfile.ruby1.9.3
    - rvm: 2.0.0
      gemfile: gemfiles/Gemfile.rails5.0
    - rvm: 2.1.2
      gemfile: gemfiles/Gemfile.ruby1.9.3
    - rvm: 2.1.2
      gemfile: gemfiles/Gemfile.rails5.0
    - rvm: 2.2.2
      gemfile: gemfiles/Gemfile.ruby1.9.3
    - rvm: jruby-19mode
      gemfile: gemfiles/Gemfile.ruby1.9.3
    - rvm: 2.3.0
      gemfile: gemfiles/Gemfile.ruby1.9.3
    - rvm: jruby-19mode
      gemfile: gemfiles/Gemfile.rails5.0
    - env: DB=sqlite USE_SQLITE_EXT=1
      rvm: jruby-19mode