<NME> development.rb.rbt
<BEF> # encoding: utf-8

# http://wiki.github.com/botanicus/rango/environments-support
require "rango/environments"

# database connection
<% case @orm %>
<% when "sequel" %>
# http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html
case Rango.environment
when "development", "production", "staging"
  DB = Sequel.connect("sqlite://db/#{Rango.environment}.db")
when "test", "spec", "cucumber"
  DB = Sequel.sqlite # in memory database
end
<% when "datamapper" %>
case Rango.environment
when "development", "production", "staging"
  DataMapper.setup(:default, "sqlite3:db/#{Rango.environment}.db")
when "test", "spec", "cucumber"
  DataMapper.setup(:default, "sqlite3::memory:")
end
<% when "mongomapper" %>
MongoMapper.database = "todo-#{Rango.environment}"
<% end %>

if Rango.development?
  Rango.logger = SimpleLogger::Logger.new(STDOUT)
  Rango.logger.auto_flush = true
else
  Rango.logger = SimpleLogger::Plain.new("log/#{Rango.environment}.log")
  Rango.logger.auto_flush = false
end

# write log at exit
at_exit { Rango.logger.close }

<MSG> Updated stack generator

<DFF> @@ -21,7 +21,7 @@ when "test", "spec", "cucumber"
   DataMapper.setup(:default, "sqlite3::memory:")
 end
 <% when "mongomapper" %>
-MongoMapper.database = "todo-#{Rango.environment}"
+MongoMapper.database = "#{Rango.environment}"
 <% end %>
 
 if Rango.development?

Updated stack generator