dist: bionic

language: ruby
matrix:
  allow_failures:
    - rvm: ruby-head

before_install:
  - gem install bundler

rvm:
  - 1.9.3
  - 2.0.0
  - 2.1
  - 2.2
  - 2.3
  - 2.4
  - 2.5
  - 2.6
  - jruby
  - ruby-head

notifications:
  webhooks:
    urls:
      - http://buildlight.collectiveidea.com/
    on_start: always

dist: xenial

language: ruby
matrix:
  allow_failures:
    - rvm: ruby-head

before_install:
  - gem install bundler -v "${BUNDLER_VERSION:->= 2}"

rvm:
  - 2.3
  - 2.4
  - 2.5
  - 2.6
  - jruby
  - ruby-head

matrix:
  include:
    - rvm: 2.0.0-p648
      env: BUNDLER_VERSION="1.17.3"
    - rvm: 2.1.10
      env: BUNDLER_VERSION="1.17.3"
    - rvm: 2.2.10
      env: BUNDLER_VERSION="1.17.3"

notifications:
  webhooks:
    urls:
      - http://buildlight.collectiveidea.com/
    on_start: always

Use bundler 1.x for older versions of Ruby and remove 1.9
Use bundler 1.x for older versions of Ruby and remove 1.9

Bundler 2.x requires Ruby 2.3+ but we want to be able to support older
versions back to at least 2.0. I've had to remove 1.9 from the test
matrix since it is failing due to the JSON gem no longer being
compatible. This locks to the latest version of Bundler 1.x for those
versions of Ruby that don't support 2.0.

Ruby 2.0 and 2.1 are not available on the Bionic images.
