templates/default/lib/db.rb in rails-maker-0.1.1 vs templates/default/lib/db.rb in rails-maker-0.1.7
- old
+ new
@@ -1,2 +1,25 @@
-run 'rake db:migrate'
-run 'rake db:test:prepare'
+say '## DB >>'
+
+run 'rm config/database.yml'
+
+file 'config/example-databse.yml', <<-END
+defaults: &defaults
+ adapter: postgresql
+ encoding: unicode
+ pool: 25
+ username: username
+ password: password
+ host: localhost
+
+development:
+ <<: *defaults
+ database: dev_#{ARGV[0].underscore}
+
+test:
+ <<: *defaults
+ database: test_#{ARGV[0].underscore}
+
+production:
+ <<: *defaults
+ database: prod_#{ARGV[0].underscore}
+END
\ No newline at end of file