# run very flat apps with merb -I <app file>.

# Uncomment for DataMapper ORM
<%= "# " unless orm == :datamapper %>use_orm :datamapper

# Uncomment for ActiveRecord ORM
<%= "# " unless orm == :activerecord %>use_orm :activerecord

# Uncomment for Sequel ORM
<%= "# " unless orm == :sequel %>use_orm :sequel


#
# ==== Pick what you test with
#

# This defines which test framework the generators will use.
# RSpec is turned on by default.
#
# To use Test::Unit, you need to install the merb_test_unit gem.
# To use RSpec, you don't have to install any additional gems, since
# merb-core provides support for RSpec.
#
<%= "# " unless testing_framework == :test_unit %>use_test :test_unit
<%= "# " unless testing_framework == :rspec %>use_test :rspec

#
# ==== Choose which template engine to use by default
#

# Merb can generate views for different template engines, choose your favourite as the default.

<%= "# " unless template_engine == :erb %>use_template_engine :erb
<%= "# " unless template_engine == :haml %>use_template_engine :haml

# If you need to use dependency immediately in this file you must add :immediate => true 
# to dependency definition:
# dependency "merb-slices", :immediate => true
#
# Specify a specific version of a dependency
# dependency "RedCloth", "> 3.0"

Merb::Config.use { |c|
  c[:framework]           = { :public => [Merb.root / "public", nil] }
  c[:session_store]       = 'none'
  c[:exception_details]   = true
	c[:log_level]           = :debug # or error, warn, info or fatal
  c[:log_stream]          = STDOUT
  # or use file for loggine:
  # c[:log_file]          = Merb.root / "log" / "merb.log"

	c[:reload_classes]   = true
	c[:reload_templates] = true
}



Merb::Router.prepare do
  match('/').to(:controller => '<%= base_name %>', :action =>'index')
end

class <%= class_name %> < Merb::Controller
  def index
    "Hi, I am 'very flat' Merb application. I have everything in one single file and well suited for dynamic stub pages."
  end
end
