Sha256: 264599dd918925b4d49ed1c6a2c27d69b3c5234b2c585d08244a3002cf528a83

Contents?: true

Size: 1.77 KB

Versions: 18

Compression:

Stored size: 1.77 KB

Contents

#
# ==== Standalone <%= module_name %> configuration
# 
# This configuration/environment file is only loaded by bin/slice, which can be 
# used during development of the slice. It has no effect on this slice being
# loaded in a host application. To run your slice in standalone mode, just
# run 'slice' from its directory. The 'slice' command is very similar to
# the 'merb' command, and takes all the same options, including -i to drop 
# into an irb session for example.
#
# The usual Merb configuration directives and init.rb setup methods apply,
# including use_orm and before_app_loads/after_app_loads.
#
# If you need need different configurations for different environments you can 
# even create the specific environment file in config/environments/ just like
# in a regular Merb application. 
#
# In fact, a slice is no different from a normal # Merb application - it only
# differs by the fact that seamlessly integrates into a so called 'host'
# application, which in turn can override or finetune the slice implementation
# code and views.
#

Merb::Config.use do |c|

  # Sets up a custom session id key which is used for the session persistence
  # cookie name.  If not specified, defaults to '_session_id'.
  # c[:session_id_key] = '_session_id'
  
  # The session_secret_key is only required for the cookie session store.
  c[:session_secret_key]  = '<%= SHA1.new(rand(100000000000).to_s).to_s %>'
  
  # There are various options here, by default Merb comes with 'cookie', 
  # 'memory', 'memcache' or 'container'.  
  # You can of course use your favorite ORM instead: 
  # 'datamapper', 'sequel' or 'activerecord'.
  c[:session_store] = 'cookie'
  
  # When running a slice standalone, you're usually developing it,
  # so enable template reloading by default.
  c[:reload_templates] = true
  
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
merb-slices-0.9.12 lib/generators/templates/full/config/init.rb
merb-slices-1.0.2 lib/generators/templates/full/config/init.rb
merb-slices-1.0.3 lib/generators/templates/full/config/init.rb
merb-slices-0.9.10 lib/generators/templates/full/config/init.rb
merb-slices-0.9.11 lib/generators/templates/full/config/init.rb
merb-slices-0.9.13 lib/generators/templates/full/config/init.rb
merb-slices-0.9.8 lib/generators/templates/full/config/init.rb
merb-slices-0.9.9 lib/generators/templates/full/config/init.rb
merb-slices-1.0.1 lib/generators/templates/full/config/init.rb
merb-slices-1.0.4 lib/generators/templates/full/config/init.rb
merb-slices-1.0.5 lib/generators/templates/full/config/init.rb
merb-slices-1.0.8.1 lib/generators/templates/full/config/init.rb
merb-slices-1.0.6 lib/generators/templates/full/config/init.rb
merb-slices-1.0.6.1 lib/generators/templates/full/config/init.rb
merb-slices-1.0.7 lib/generators/templates/full/config/init.rb
merb-slices-1.0 lib/generators/templates/full/config/init.rb
merb-slices-1.0.7.1 lib/generators/templates/full/config/init.rb
merb-slices-1.0.8 lib/generators/templates/full/config/init.rb