Sha256: fcd4379ed9e1fb12e3b8e3df454eb272bcc162eeeb4a2dcde442c4a281eae458
Contents?: true
Size: 1.7 KB
Versions: 24
Compression:
Stored size: 1.7 KB
Contents
# 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 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
24 entries across 24 versions & 1 rubygems