language: ruby
services:
  - sqlite3
  - mysql
  - postgresql
before_script:
  - mysql -e "create database datamapper_alternate_tests;"
  - mysql -e "create database datamapper_default_tests;"
  - psql  -c "create database datamapper_default_tests;" -U postgres
  - psql  -c "create database datamapper_alternate_tests;" -U postgres
before_install:
  - gem install bundler
bundler_args: --without yard guard metrics benchmarks
script: "bundle exec rake spec"
rvm:
  - ree
  - 1.8.7
  - 1.9.3
  - 2.0.0
  - ruby-head
  - rbx-18mode
  - rbx-19mode
  - jruby-18mode
env:
  - "GIT_BRANCH=release-1.2 ADAPTER=in_memory"
  - "GIT_BRANCH=release-1.2 ADAPTER=yaml"
  - "GIT_BRANCH=release-1.2 ADAPTER=sqlite"
  - "GIT_BRANCH=release-1.2 ADAPTER=mysql DM_DB_USER=root DM_DB_PASSWORD=''"
  - "GIT_BRANCH=release-1.2 ADAPTER=postgres DM_DB_USER=postgres DM_DB_PASSWORD=''"
notifications:
  irc: "irc.freenode.org#datamapper"
  email:
    - dan.kubb@gmail.com
matrix:
  allow_failures:
    - rvm: rbx-19mode
      env: "GIT_BRANCH=release-1.2 ADAPTER=yaml"
  include:
    - rvm: jruby-19mode
      env: JRUBY_OPTS="$JRUBY_OPTS --debug"
    - rvm: jruby-head
      env: JRUBY_OPTS="$JRUBY_OPTS --debug"
branches:
  only:
    - /^release-.*$/
