Sha256: 7e8f8d82eee51678af29e8d1a3c1bcb9058b45a6f654745690612780623bca6e

Contents?: true

Size: 1.65 KB

Versions: 3

Compression:

Stored size: 1.65 KB

Contents

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

# Uncomment for DataMapper ORM
<%= "# " unless orm == :datamapper %>require 'merb_datamapper'

# Uncomment for ActiveRecord ORM
<%= "# " unless orm == :activerecord %>require 'merb_activerecord'

# Uncomment for Sequel ORM
<%= "# " unless orm == :sequel %>require 'merb_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 == :haml %>require 'merb-haml'

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
merb-gen-1.1.3 lib/generators/templates/application/merb_very_flat/application.rbt
merb-gen-1.1.2 lib/generators/templates/application/merb_very_flat/application.rbt
merb-gen-1.1.1 lib/generators/templates/application/merb_very_flat/application.rbt