From d8ef9c6b9c97d110cef8c714d1026e00603f8110 Mon Sep 17 00:00:00 2001 From: Dan Pickett Date: Fri, 20 Dec 2013 11:23:56 -0500 Subject: [PATCH] move switch to PG up higher in the script --- template.rb | 54 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/template.rb b/template.rb index 6d0c2f7..70cd2a1 100644 --- a/template.rb +++ b/template.rb @@ -120,6 +120,33 @@ def from_repo(github_user, project_name, from, to = from.split("/").last) ::FileUtils.rm_rf("test") +file 'config/database_pg.example.yml', +%Q{ # PostgreSQL. Versions 7.4 and 8.x are supported. + +development: + adapter: postgresql + encoding: unicode + database: #{app_name}_development + pool: 5 + username: app + password: qwerty + host: 127.0.0.1 + + +test: + adapter: postgresql + encoding: unicode + database: #{app_name}_test + pool: 5 + username: app + password: qwerty + host: 127.0.0.1 + +} + +run 'cp config/database_pg.example.yml config/database.yml' +run 'rake db:create' + generate("rspec:install") file '.rspec', %q{ @@ -154,33 +181,6 @@ def from_repo(github_user, project_name, from, to = from.split("/").last) # APP #==================== -file 'config/database_pg.example.yml', -%Q{ # PostgreSQL. Versions 7.4 and 8.x are supported. - -development: - adapter: postgresql - encoding: unicode - database: #{app_name}_development - pool: 5 - username: app - password: qwerty - host: 127.0.0.1 - - -test: - adapter: postgresql - encoding: unicode - database: #{app_name}_test - pool: 5 - username: app - password: qwerty - host: 127.0.0.1 - -} - -run 'cp config/database_pg.example.yml config/database.yml' -run 'rake db:create' - file 'app/helpers/application_helper.rb', %q{module ApplicationHelper def body_class