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


<MSG> Fixed stubs

<DFF> @@ -1,8 +1,41 @@
 # encoding: utf-8
 
+require "pathname"
+require "rack/builder"
+
+module <%= @name.camel_case %>
+  def self.root
+    @@root ||= File.expand_path("../<%= @name %>", __FILE__)
+  end
+
+  def self.path
+    @@path ||= Pathname.new(self.root)
+  end
+
+  def self.rack
+    @@rack ||= Rack::Builder.new
+  end
+
+  def self.rackup(&block)
+    self.rack.instance_eval(&block)
+    return self.rack
+  end
+end
+
 # initializers
-require "<%= @name %>/initializers/url.rb"
+Rango.logger.info("Loading initializers ...")
+Dir["#{<%= @name.camel_case %>.root}/initializers/*.rb"].each do |path|
+  Rango.logger.debug("Loading initializer #{File.basename(path)}")
+  require path
+end
+
+# load models
+Rango.logger.info("Loading models ...")
+Dir["#{<%= @name.camel_case %>.root}/models/**/*.rb"].each do |path|
+  Rango.logger.debug("Loading model #{File.basename(path)}")
+  require path
+end
 
-# after environment is set
-require "<%= @name %>/views.rb"
-require "<%= @name %>/models.rb"
+# load views
+Rango.logger.info("Loading views ...")
+require "<%= @name %>/views"

Fixed stubs