addons:
  apt:
    packages:
    - libmagic-dev
  code_climate:
    repo_token: 486bb0a91d51ad96ec90a47dced78f74bfe54ae9b913ac83fa48d69703e3f66d
language: ruby
sudo: false
cache: bundler
services:
  - mysql
  - redis
rvm:
  - 2.0.0
  - 2.1.0
  - 2.2.3
env:
  - SUGAR_DB=sqlite
  - SUGAR_DB=mysql
  - SUGAR_DB=postgresql
matrix:
  exclude:
    - rvm: 2.0.0
      env: SUGAR_DB=sqlite
    - rvm: 2.0.0
      env: SUGAR_DB=postgresql
    - rvm: 2.1.0
      env: SUGAR_DB=sqlite
    - rvm: 2.1.0
      env: SUGAR_DB=postgresql
script:
  - bundle exec rspec spec
before_script:
  - sh -c "if [ '$SUGAR_DB' = 'mysql' ]; then mysql -e 'create database sugar_test;'; fi"
  - sh -c "if [ '$SUGAR_DB' = 'postgresql' ]; then psql -c 'create database sugar_test' -U postgres; fi"
  - sh -c "if [ '$SUGAR_DB' = 'sqlite' ]; then bundle exec rake db:create; fi"
  - bundle exec rake db:migrate

addons:
  apt:
    packages:
    - libmagic-dev
  code_climate:
    repo_token: 486bb0a91d51ad96ec90a47dced78f74bfe54ae9b913ac83fa48d69703e3f66d
language: ruby
sudo: false
cache: bundler
services:
  - mysql
  - redis
rvm:
  - 2.1.0
  - 2.2.3
  - 2.3.0
env:
  - SUGAR_DB=sqlite
  - SUGAR_DB=mysql
  - SUGAR_DB=postgresql
matrix:
  exclude:
    - rvm: 2.1.0
      env: SUGAR_DB=sqlite
    - rvm: 2.1.0
      env: SUGAR_DB=postgresql
script:
  - bundle exec rspec spec
before_script:
  - sh -c "if [ '$SUGAR_DB' = 'mysql' ]; then mysql -e 'create database sugar_test;'; fi"
  - sh -c "if [ '$SUGAR_DB' = 'postgresql' ]; then psql -c 'create database sugar_test' -U postgres; fi"
  - sh -c "if [ '$SUGAR_DB' = 'sqlite' ]; then bundle exec rake db:create; fi"
  - bundle exec rake db:migrate

Build on 2.3, not on 2.0
Build on 2.3, not on 2.0
