| 300 | 1 #!/bin/sh | 
|  | 2 | 
|  | 3 test true = "$CI" && bi_params="--without development" | 
|  | 4 bundle install $bi_params | 
|  | 5 | 
|  | 6 if ! test -f config/database.yml; then | 
|  | 7   cat << EOF > config/database.yml | 
|  | 8 test: | 
|  | 9   adapter: postgresql | 
|  | 10   database: zp_test | 
|  | 11   user: postgres | 
|  | 12 EOF | 
|  | 13 fi | 
|  | 14 | 
|  | 15 if ! test -f config/local_config.rb; then | 
|  | 16   # rake requires booting Rails which in turn requires availability of | 
|  | 17   # local_config. | 
|  | 18   touch config/local_config.rb | 
|  | 19   cat << EOF > config/local_config.rb | 
|  | 20 CONFIG["standalone"] = true | 
|  | 21 CONFIG["secret_key"] = "$(bundle exec rake secret)" | 
|  | 22 EOF | 
|  | 23 fi | 
|  | 24 | 
|  | 25 bundle exec rake |