---
language: ruby

script: bundle exec rake

sudo: false

addons:
  apt:
    packages:
      - ragel

matrix:
  include:
    - env: TRAVIS_OS_NAME=osx
      install:
        - brew update
        - brew install ragel

install:
  - bundle install --retry=3

rvm:
  - 1.9
  - 2.0
  - 2.1
  - 2.2
  - rbx-2
  - jruby

notifications:
  email:
    recipients:
      - yorickpeterse@gmail.com
    on_success: change
    on_failure: change

cache: bundler

os:
  - linux
  - osx

---
language: ruby

script: bundle exec rake

sudo: false

addons:
  apt:
    packages:
      - ragel

before_install:
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ragel; fi

install:
  - bundle install --retry=3

rvm:
  - 1.9
  - 2.0
  - 2.1
  - 2.2
  - rbx-2
  - jruby

notifications:
  email:
    recipients:
      - yorickpeterse@gmail.com
    on_success: change
    on_failure: change

cache: bundler

os:
  - linux
  - osx

Use before_install checks to install Ragel on OS X
Use before_install checks to install Ragel on OS X
