sudo: false
cache: bundler
language: ruby
dist: trusty
rvm:
  - jruby-9.1.13.0
  - jruby-head
  - 2.1.10
  - 2.2.8
  - 2.3.5
  - 2.4.2
  - ruby-head
  - rbx-3
env:
  global:
    - JRUBY_OPTS='--debug -J-Xmx1000M' # get more accurate coverage data in JRuby
  matrix:
    - 'TASK=spec'
    - 'TASK=ascii_spec'
    - 'TASK=internal_investigation'
matrix:
  allow_failures:
    - rvm: ruby-head
    - rvm: rbx-3
    - rvm: jruby-head
  fast_finish: true
before_install:
  - gem update --remote bundler
  - gem update --system
  - rvm @global do gem uninstall bundler -a -x
  - rvm @global do gem install bundler -v 1.13.7
install:
  - bundle install --retry=3
script:
  - ruby .travis.rb
addons:
  code_climate:
    repo_token: a11b66bfbb1acdf220d5cb317b2e945a986fd85adebe29a76d411ad6d74ec31f

sudo: false
cache: bundler
language: ruby
dist: trusty
rvm:
  - jruby-9.1.13.0
  - jruby-head
  - 2.1.10
  - 2.2.8
  - 2.3.5
  - 2.4.2
  - ruby-head
  - rbx-3
env:
  global:
    - JRUBY_OPTS='--debug -J-Xmx1000M' # get more accurate coverage data in JRuby
  matrix:
    - 'TASK=spec'
    - 'TASK=ascii_spec'
    - 'TASK=internal_investigation'
matrix:
  allow_failures:
    - rvm: ruby-head
    - rvm: rbx-3
    - rvm: jruby-head
  fast_finish: true
before_install:
  - gem update --remote bundler
  - gem update --system
install:
  - bundle install --retry=3
script:
  - ruby .travis.rb
addons:
  code_climate:
    repo_token: a11b66bfbb1acdf220d5cb317b2e945a986fd85adebe29a76d411ad6d74ec31f

Fix a CI error due to Bundler integration to Ruby 2.5
Fix a CI error due to Bundler integration to Ruby 2.5

Currently Travis CI has failed to build ruby-head.
https://travis-ci.org/bbatsov/rubocop/jobs/290423966#L571

The error log is as follows.

```console
$ rvm @global do gem uninstall bundler -a -x
ERROR: While executing gem ... (Gem::InstallError)
 gem "bundler" cannot be uninstalled because it is a default gem

The command "rvm @global do gem uninstall bundler -a -x" failed and
exited with 1 during .
```

This is because Ruby 2.5 integrates Bundler into Ruby.
https://bugs.ruby-lang.org/issues/12733

This commit will remove the Travis CI setting for JRuby introduced at #3966.
Because the version of JRuby used by Travis CI is different from that of
#3966, it is likely to succeed with this.

My expectation is that installation builds on Bundler for both ruby-head
and jruby-9.1.13.0 will succeed in this commit.

However, the following test is expected to fail on ruby-head.

```console
% ruby -v
ruby 2.5.0dev (2017-10-22 trunk 60318) [x86_64-darwin13]
% bundle exec rspec ./spec/rubocop/result_cache_spec.rb

(snip)

Failures:

  1) RuboCop::ResultCache cached result that was saved with no command
  line option when no option is given when a symlink is present in the
  cache location and symlink attack protection is disabled permits
  caching and prints no warning
     Failure/Error: FileUtils.rmdir(attack_target_dir)

     Errno::ENOTEMPTY:
       Directory not empty @ dir_s_rmdir - /var/folders/6g/n37ypc6554dcgy3fgdj9nkqm0000gn/T/d20171022-15315-1lytu2s
     # ./spec/rubocop/result_cache_spec.rb:97:in `block (5 levels) in <top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:27:in `block (4 levels) in <top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:26:in `chdir'
     # ./lib/rubocop/rspec/shared_contexts.rb:26:in `block (3 levels) in <top (required)>'
     # ./lib/rubocop/rspec/shared_contexts.rb:8:in `block (2 levels) in <top (required)>'

Finished in 0.21599 seconds (files took 1.02 seconds to load)
14 examples, 1 failure

Failed examples:

rspec ./spec/rubocop/result_cache_spec.rb:123 # RuboCop::ResultCache
cached result that was saved with no command line option when no option
is given when a symlink is present in the cache location and symlink
attack protection is disabled permits caching and prints no warning
```

First of all it is desirable to be able to know the test cases that fail
with ruby-head like this. Therefore, I hope this will be merge if the
installation build succeed.
