lib/generators/cucumber/templates/lib/templates.rb.erb in singem-0.0.4 vs lib/generators/cucumber/templates/lib/templates.rb.erb in singem-0.0.5
- old
+ new
@@ -1,9 +1,16 @@
-require 'rubygems'
require 'sinatra/base'
require 'haml/util'
require 'haml/engine'
module <%= name.camelize %>
+ def self.app
+ @app ||= Rack::Builder.new do
+ # use Rack::HoptoadNotifier 'mysecretkey'
+ # use Rack::Session::Cookie, :key => 'rack.session', :path => '/',
+ # :expire_after => 2592000, :secret => '<%= ::Digest::SHA1.hexdigest(Time.now.to_s) %>'
+ run <%= name.camelize %>::App
+ end
+ end
end
require File.dirname(__FILE__)+'/<%= name %>/app'