# HG changeset patch # User edogawaconan # Date 1392187377 -32400 # Node ID f84df8a294e69e4a25c976921b93405801f1cdde # Parent d6e94d7d03251a5c2646fd92a03f3858ca66eb0b Put build script to bin/. diff -r d6e94d7d0325 -r f84df8a294e6 bin/run_test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/run_test Wed Feb 12 15:42:57 2014 +0900 @@ -0,0 +1,25 @@ +#!/bin/sh + +test true = "$CI" && bi_params="--without development" +bundle install $bi_params + +if ! test -f config/database.yml; then + cat << EOF > config/database.yml +test: + adapter: postgresql + database: zp_test + user: postgres +EOF +fi + +if ! test -f config/local_config.rb; then + # rake requires booting Rails which in turn requires availability of + # local_config. + touch config/local_config.rb + cat << EOF > config/local_config.rb +CONFIG["standalone"] = true +CONFIG["secret_key"] = "$(bundle exec rake secret)" +EOF +fi + +bundle exec rake