allow <environment>-local.rb to overwrite cache configuration

so that memory_store can be used in development

Change-Id: Iaa3badc732b32c0f6970a969b172aa76190e08f7
Reviewed-on: https://gerrit.instructure.com/5882
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
Cody Cutrer 2011-09-28 09:55:08 -06:00
parent 593f36991b
commit 23edefc404
2 changed files with 6 additions and 6 deletions

View File

@ -27,14 +27,14 @@ config.to_prepare do
Canvas.dynamic_finder_type_cast_error = :raise
end
# eval <env>-local.rb if it exists
Dir[File.dirname(__FILE__) + "/" + File.basename(__FILE__, ".rb") + "-*.rb"].each { |localfile| eval(File.new(localfile).read) }
# initialize cache store
# this needs to happen in each environment config file, rather than a
# config/initializer/* file, to allow Rails' full initialization of the cache
# to take place, including middleware inserts and such.
config.cache_store = Canvas.cache_store_config
# eval <env>-local.rb if it exists
Dir[File.dirname(__FILE__) + "/" + File.basename(__FILE__, ".rb") + "-*.rb"].each { |localfile| eval(File.new(localfile).read) }
# allow debugging only in development environment by default
require "ruby-debug"

View File

@ -15,11 +15,11 @@ config.action_view.cache_template_loading = true
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# eval <env>-local.rb if it exists
Dir[File.dirname(__FILE__) + "/" + File.basename(__FILE__, ".rb") + "-*.rb"].each { |localfile| eval(File.new(localfile).read) }
# initialize cache store
# this needs to happen in each environment config file, rather than a
# config/initializer/* file, to allow Rails' full initialization of the cache
# to take place, including middleware inserts and such.
config.cache_store = Canvas.cache_store_config
# eval <env>-local.rb if it exists
Dir[File.dirname(__FILE__) + "/" + File.basename(__FILE__, ".rb") + "-*.rb"].each { |localfile| eval(File.new(localfile).read) }