summaryrefslogtreecommitdiff
path: root/config/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/application.rb')
-rw-r--r--config/application.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 5d7c52c5d81..192e836594a 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -22,6 +22,7 @@ module Gitlab
require_dependency Rails.root.join('lib/gitlab/current_settings')
require_dependency Rails.root.join('lib/gitlab/middleware/read_only')
require_dependency Rails.root.join('lib/gitlab/middleware/basic_health_check')
+ require_dependency Rails.root.join('config/light_settings')
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -62,6 +63,15 @@ module Gitlab
config.paths['app/views'].unshift "#{config.root}/ee/app/views"
end
+ if LightSettings.com?
+ com_paths = config.eager_load_paths.each_with_object([]) do |path, memo|
+ com_path = config.root.join('com', Pathname.new(path).relative_path_from(config.root))
+ memo << com_path.to_s
+ end
+
+ config.eager_load_paths.push(*com_paths)
+ end
+
# Rake tasks ignore the eager loading settings, so we need to set the
# autoload paths explicitly
config.autoload_paths = config.eager_load_paths.dup