#!/bin/bash # A script for running a build for CI using RVM. PATH=$PATH:$HOME/.rvm/bin:/usr/bin:`dirname $0` [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" export RAILS_ENV=test db_config `app_adapter ${WORKSPACE}/Gemfile` ${JOB_NAME} > ${WORKSPACE}/config/database.yml && \ cd ${WORKSPACE} && \ bundle --without production && \ bundle exec rake db:drop db:create db:schema:load && \ xvfb-run -a rspec spec