Commit 69d5f48c2b52a15fd896d9e2629e3805bb8c010e

Authored by Braulio Bhavamitra
1 parent 65264159

rails4: use eager_load by default (fix api tests)

config/application.rb
@@ -105,6 +105,8 @@ module Noosfero @@ -105,6 +105,8 @@ module Noosfero
105 config.paths['db/migrate'].concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/db/migrate") 105 config.paths['db/migrate'].concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/db/migrate")
106 config.i18n.load_path.concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/locales/*.{rb,yml}") 106 config.i18n.load_path.concat Dir.glob("#{Rails.root}/{baseplugins,config/plugins}/*/locales/*.{rb,yml}")
107 107
  108 + config.eager_load = true
  109 +
108 Noosfero::Plugin.setup(config) 110 Noosfero::Plugin.setup(config)
109 111
110 end 112 end
config/environments/cucumber.rb
@@ -9,8 +9,6 @@ Noosfero::Application.configure do @@ -9,8 +9,6 @@ Noosfero::Application.configure do
9 9
10 config.assets.debug = false 10 config.assets.debug = false
11 11
12 - config.eager_load = false  
13 -  
14 config.active_support.deprecation = :log 12 config.active_support.deprecation = :log
15 13
16 # Show full error reports and disable caching 14 # Show full error reports and disable caching
config/environments/production.rb
@@ -5,8 +5,6 @@ Noosfero::Application.configure do @@ -5,8 +5,6 @@ Noosfero::Application.configure do
5 # Code is not reloaded between requests 5 # Code is not reloaded between requests
6 config.cache_classes = true 6 config.cache_classes = true
7 7
8 - config.eager_load = true  
9 -  
10 # Full error reports are disabled and caching is turned on 8 # Full error reports are disabled and caching is turned on
11 # config.action_controller.perform_caching = true 9 # config.action_controller.perform_caching = true
12 10
config/environments/test.rb
@@ -7,8 +7,6 @@ Noosfero::Application.configure do @@ -7,8 +7,6 @@ Noosfero::Application.configure do
7 # and recreated between test runs. Don't rely on the data there! 7 # and recreated between test runs. Don't rely on the data there!
8 config.cache_classes = true 8 config.cache_classes = true
9 9
10 - config.eager_load = false  
11 -  
12 # Configure static asset server for tests with Cache-Control for performance 10 # Configure static asset server for tests with Cache-Control for performance
13 config.serve_static_assets = true 11 config.serve_static_assets = true
14 config.static_cache_control = "public, max-age=3600" 12 config.static_cache_control = "public, max-age=3600"