cache: bundler
language: ruby
rvm:
  - 2.1
  - 2.2
  - 2.3.0
  - jruby-9.0.0.0
  - jruby-head
  - ruby-head
script: bundle exec rspec
sudo: false

before_install: gem install bundler -v 1.11.2
bundler_args: --without development

matrix:
  allow_failures:
    - rvm: jruby-head
    - rvm: ruby-head
  fast_finish: true
  include:
    - rvm: 2.4.0
      before_script:
        - bundle exec danger
      after_script:
        - bundle exec codeclimate-test-reporter

addons:
  code_climate:
    repo_token: 4c8d32857f6271a921d0db0bdf9a316c47b5cc89827c85da862ab2738842dbb1

cache: bundler
language: ruby
rvm:
  - 2.1
  - 2.2
  - 2.3.0
  - jruby-9.0.0.0
  - jruby-head
  - ruby-head
script: bundle exec rspec
sudo: false

before_install:
  - gem update --system --no-doc
  - gem install bundler -v 1.14.1

bundler_args: --without development

matrix:
  allow_failures:
    - rvm: jruby-head
    - rvm: ruby-head
  fast_finish: true
  include:
    - rvm: 2.4.0
      before_script:
        - bundle exec danger
      after_script:
        - bundle exec codeclimate-test-reporter

addons:
  code_climate:
    repo_token: 4c8d32857f6271a921d0db0bdf9a316c47b5cc89827c85da862ab2738842dbb1

Update RubyGems prior to installing bundle
Update RubyGems prior to installing bundle

By enabled Danger, we enable the installation of Rubocop on the CI
environment. Rubocop depends on the "rainbow" library which has a build
error on certain versions of RubyGems. This has been fixed in newer
versions of RubyGems, so let's just update RubyGems prior to trying to
install anything.

See: https://github.com/sickill/rainbow/issues/44
See: https://github.com/rubygems/rubygems/pull/1819
