---
language: ruby
dist: trusty
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y libvirt-dev
  - gem update --system
  - gem install bundler
install: bundle install
script: bundle exec rspec --color --format documentation
notifications:
  email: false
rvm:
  - 2.2.5
  - 2.3.3
env:
  global:
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
  matrix:
    - VAGRANT_VERSION=v2.0.1
matrix:
  allow_failures:
    - env: VAGRANT_VERSION=master
      rvm: 2.3.3

---
language: ruby
dist: trusty
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y libvirt-dev
  - gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)
  - gem update bundler --conservative
install: bundle install
script: bundle exec rspec --color --format documentation
notifications:
  email: false
rvm:
  - 2.2.5
  - 2.3.3
env:
  global:
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
  matrix:
    - VAGRANT_VERSION=v2.0.1
matrix:
  allow_failures:
    - env: VAGRANT_VERSION=master
      rvm: 2.3.3

Handle rubygems >= 3 dropping support for ruby < 2.3.0
Handle rubygems >= 3 dropping support for ruby < 2.3.0

Rubygems releases >= 3 have removed support for older versions of ruby
(<2.3). While testing with distributions with older versions of ruby
make sure to use the conservative install method as suggested from
https://github.com/rubygems/rubygems/issues/2534#issuecomment-448843746
