lib/padrino-gen/generators/components/orms/couchrest_gen.rb in padrino-gen-0.9.1 vs lib/padrino-gen/generators/components/orms/couchrest_gen.rb in padrino-gen-0.9.2

- old
+ new

@@ -5,19 +5,19 @@ module CouchrestGen COUCHREST = (<<-COUCHREST).gsub(/^ {10}/, '') case Padrino.env - when :development then COUCHDB = "your_db_name_development" - when :production then COUCHDB = "your_db_name_production" - when :test then COUCHDB = "your_db_name_test" + when :development then COUCHDB = '!NAME!_name_development' + when :production then COUCHDB = '!NAME!_name_production' + when :test then COUCHDB = '!NAME!_name_test' end CouchRest.database!(COUCHDB) COUCHREST def setup_orm require_dependencies 'couchrest' - create_file("config/database.rb", COUCHREST) + create_file("config/database.rb", COUCHREST.gsub(/!NAME!/, name.underscore)) empty_directory('app/models') end CR_MODEL = (<<-MODEL).gsub(/^ {10}/, '') class !NAME! < CouchRest::ExtendedDocument