diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 3 | ||||
-rw-r--r-- | config/environments/development.rb | 8 | ||||
-rw-r--r-- | config/general.yml-example | 8 | ||||
-rw-r--r-- | config/initializers/alaveteli.rb | 3 |
4 files changed, 19 insertions, 3 deletions
diff --git a/config/application.rb b/config/application.rb index 472077f06..46c4eb93b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -60,7 +60,8 @@ module Alaveteli config.time_zone = ::AlaveteliConfiguration::time_zone # Set the cache to use a memcached backend - config.cache_store = :mem_cache_store, { :namespace => AlaveteliConfiguration::domain } + config.cache_store = :mem_cache_store, + { :namespace => "#{AlaveteliConfiguration::domain}_#{RUBY_VERSION}" } config.action_dispatch.rack_cache = nil config.after_initialize do |app| diff --git a/config/environments/development.rb b/config/environments/development.rb index dbf8d7b2a..b334a1e19 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -46,4 +46,12 @@ Alaveteli::Application.configure do # with SQLite, MySQL, and PostgreSQL) config.active_record.auto_explain_threshold_in_seconds = 0.5 + if AlaveteliConfiguration.use_bullet_in_development + config.after_initialize do + Bullet.enable = true + Bullet.bullet_logger = true + Bullet.console = true + Bullet.add_footer = true + end + end end diff --git a/config/general.yml-example b/config/general.yml-example index df140136c..a6980b71c 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -673,6 +673,14 @@ PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE: false # --- USE_MAILCATCHER_IN_DEVELOPMENT: true +# Bullet is a tool to help to kill N+1 queries and unused eager loading +# https://github.com/flyerhzm/bullet +# +# USE_BULLET_IN_DEVELOPMENT - Boolean (default: false) +# +# --- +USE_BULLET_IN_DEVELOPMENT: false + # Use memcached to cache HTML fragments for better performance. This will # only have an effect in environments where # config.action_controller.perform_caching is set to true diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index dbd7aace2..035d744b8 100644 --- a/config/initializers/alaveteli.rb +++ b/config/initializers/alaveteli.rb @@ -10,7 +10,7 @@ load "debug_helpers.rb" load "util.rb" # Application version -ALAVETELI_VERSION = '0.21.0.25' +ALAVETELI_VERSION = '0.21.0.26' # Add new inflection rules using the following format # (all these examples are active by default): @@ -35,7 +35,6 @@ end # Load monkey patches and other things from lib/ -require 'ruby19.rb' require 'activesupport_cache_extensions.rb' require 'use_spans_for_errors.rb' require 'activerecord_errors_extensions.rb' |