Skip to content

Commit

Permalink
added verbose rack cache config to core
Browse files Browse the repository at this point in the history
  • Loading branch information
keram committed May 6, 2012
1 parent 231f71f commit 9643a90
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Expand Up @@ -34,6 +34,9 @@ Refinery::Core.configure do |config|
# http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
# config.dragonfly_secret = <%= Refinery::Core.dragonfly_secret.inspect %>

# Should display some usefull info about resources when you run webserver
# config.verbose_rack_cache = <%= Refinery::Core.verbose_rack_cache.inspect %>

# Show/hide IE6 upgrade message in the backend
# config.ie6_upgrade_message_enabled = <%= Refinery::Core.ie6_upgrade_message_enabled.inspect %>

Expand Down
3 changes: 2 additions & 1 deletion core/lib/refinery/core/configuration.rb
Expand Up @@ -7,7 +7,7 @@ module Core
:menu_hide_children, :menu_css, :dragonfly_secret, :ie6_upgrade_message_enabled,
:show_internet_explorer_upgrade_message, :wymeditor_whitelist_tags,
:javascripts, :stylesheets, :s3_bucket_name, :s3_region, :s3_access_key_id,
:s3_secret_access_key, :force_ssl
:s3_secret_access_key, :force_ssl, :verbose_rack_cache

self.rescue_not_found = false
self.s3_backend = false
Expand All @@ -28,6 +28,7 @@ module Core
self.s3_access_key_id = ENV['S3_KEY']
self.s3_secret_access_key = ENV['S3_SECRET']
self.force_ssl = false
self.verbose_rack_cache = true

def config.register_javascript(name)
self.javascripts << name
Expand Down
2 changes: 1 addition & 1 deletion images/lib/refinery/images/dragonfly.rb
Expand Up @@ -42,7 +42,7 @@ def attach!(app)
'Dragonfly::Middleware', :refinery_images

app.config.middleware.insert_before 'Dragonfly::Middleware', 'Rack::Cache', {
:verbose => Rails.env.development?,
:verbose => Refinery::Core.verbose_rack_cache,
:metastore => "file:#{Rails.root.join('tmp', 'dragonfly', 'cache', 'meta')}",
:entitystore => "file:#{Rails.root.join('tmp', 'dragonfly', 'cache', 'body')}"
}
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/refinery/resources/dragonfly.rb
Expand Up @@ -40,7 +40,7 @@ def attach!(app)
'Dragonfly::Middleware', :refinery_resources

app.config.middleware.insert_before 'Dragonfly::Middleware', 'Rack::Cache', {
:verbose => Rails.env.development?,
:verbose => Refinery::Core.verbose_rack_cache,
:metastore => "file:#{URI.encode(Rails.root.join('tmp', 'dragonfly', 'cache', 'meta').to_s)}",
:entitystore => "file:#{URI.encode(Rails.root.join('tmp', 'dragonfly', 'cache', 'body').to_s)}"
}
Expand Down

0 comments on commit 9643a90

Please sign in to comment.