2007-01-22 14:43:50 +01:00
|
|
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
|
|
|
require File.join(File.dirname(__FILE__), 'boot')
|
2007-12-21 08:48:59 +01:00
|
|
|
require 'rails_generator/secret_key_generator'
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
Rails::Initializer.run do |config|
|
2007-12-21 08:48:59 +01:00
|
|
|
|
|
|
|
# Secret session key
|
|
|
|
generator = Rails::SecretKeyGenerator.new("Instiki")
|
|
|
|
config.action_controller.session = {
|
|
|
|
:session_key => "instiki_session",
|
|
|
|
:secret => generator.generate_secret
|
|
|
|
}
|
|
|
|
|
2007-01-22 14:43:50 +01:00
|
|
|
# Skip frameworks you're not going to use
|
|
|
|
config.frameworks -= [ :action_web_service, :action_mailer ]
|
|
|
|
|
|
|
|
# Use the database for sessions instead of the file system
|
|
|
|
# (create the session table with 'rake create_sessions_table')
|
2007-02-09 09:04:31 +01:00
|
|
|
#config.action_controller.session_store = :active_record_store
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
# Enable page/fragment caching by setting a file-based store
|
|
|
|
# (remember to create the caching directory and make it readable to the application)
|
2007-03-10 07:18:18 +01:00
|
|
|
config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
# Activate observers that should always be running
|
|
|
|
config.active_record.observers = :page_observer
|
|
|
|
|
|
|
|
# Use Active Record's schema dumper instead of SQL when creating the test database
|
|
|
|
# (enables use of different database adapters for development and test environments)
|
2007-04-09 00:35:33 +02:00
|
|
|
config.active_record.schema_format = :sql
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
config.load_paths << "#{RAILS_ROOT}/vendor/plugins/sqlite3-ruby"
|
2007-03-31 17:06:51 +02:00
|
|
|
File.umask(0026)
|
2007-01-22 14:43:50 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
# Instiki-specific configuration below
|
|
|
|
require_dependency 'instiki_errors'
|
|
|
|
|
|
|
|
require 'jcode'
|