language: ruby
sudo: false
cache: bundler
notifications:
  webhooks: https://www.travisbuddy.com
  on_success: never

before_install:
  # Install Code Climate test reporter
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter

rvm:
  - 2.1
  - 2.2
  - 2.3
  - 2.4
  - ruby-head
  - jruby-head

gemfile:
  - gemfiles/redis_3_x.gemfile
  - gemfiles/redis_4_x.gemfile

before_script: ./cc-test-reporter before-build

# Pipe the coverage data to Code Climate if tests pass
after_script:
  - ./cc-test-reporter after-build --exit-code $EXIT_CODE
  - ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json
  - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi  # Upload coverage/codeclimate.json

matrix:
  allow_failures:
    - rvm: jruby-head
    - rvm: ruby-head
  exclude:
    - rvm: 2.1
      gemfile: gemfiles/redis_4_x.gemfile

language: ruby
sudo: false
cache: bundler
notifications:
  webhooks: https://www.travisbuddy.com
  on_success: never

before_install:
  # Install Code Climate test reporter
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter

rvm:
  - 2.1
  - 2.2
  - 2.3
  - 2.4
  - ruby-head
  - jruby-head

gemfile:
  - gemfiles/redis_3_x.gemfile
  - gemfiles/redis_4_x.gemfile

before_script: ./cc-test-reporter before-build

# Pipe the coverage data to Code Climate if tests pass
after_script:
  - ./cc-test-reporter after-build --exit-code $EXIT_CODE
  - ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json
  - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi  # Upload coverage/codeclimate.json

matrix:
  allow_failures:
    - rvm: jruby-head
    - rvm: ruby-head
  exclude:
    - rvm: 2.1
      gemfile: gemfiles/redis_4_x.gemfile
    - rvm: 2.2
      gemfile: gemfiles/redis_4_x.gemfile

Fix error in Ruby 2.2 build
Fix error in Ruby 2.2 build
