# Sets Travis to run the Ruby specs on OS X machines to be as close as possible
# to the user environment.
#
language: objective-c
addons:
 code_climate:
   repo_token: e8abdb417b7d86d7427d8861e85209c7b194820bb372a1c05f0529835eac9c7c

branches:
  only:
    - master
    - /.+-stable$/

env:
  - RVM_RUBY_VERSION=system
  # - RVM_RUBY_VERSION=1.8.7-p358

before_install:
  - export LANG=en_US.UTF-8
  - curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem
  - source ~/.rvm/scripts/rvm
  - if [[ $RVM_RUBY_VERSION != 'system' ]]; then rvm install $RVM_RUBY_VERSION; fi
  - rvm use $RVM_RUBY_VERSION
  - if [[ $RVM_RUBY_VERSION == 'system' ]]; then sudo gem install bundler --no-ri --no-rdoc; else gem install bundler --no-ri --no-rdoc; fi


install:
  - sudo bundle install --without=documentation

script: bundle exec rake spec

# Sets Travis to run the Ruby specs on OS X machines to be as close as possible
# to the user environment.
#
language: ruby

dist: trusty

branches:
  only:
    - master
    - /.+-stable$/

matrix:
  include:
    - rvm: 2.4.1

rvm:
  - 2.0.0-p647
  - 2.3.4
  - 2.4.1
  - 2.6.2

before_install:
  # There is a bug in travis. When using system ruby, bundler is not
  # installed and causes the default install action to fail.
  - if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem install "bundler:~> 1.17"; else gem install "bundler:~> 1.17"; fi
  # RubyGems 2.0.14 isn't a fun time on 2.0.0p648
  - if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem update --system; fi

install:
  - bundle install --path .bundle
  - bundle exec pod repo add-cdn trunk 'https://cdn.cocoapods.org'

script: bundle exec rake spec

Use a matrix for CI config
Use a matrix for CI config
