diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-03 00:05:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-03 00:05:59 +0000 |
commit | 427b23c12718bea233931431e7d9307881a960c0 (patch) | |
tree | 5e15672783c950a5e68dd89517d7888e652e01a7 /config/application.rb | |
parent | 6d60f910762c1a92a07a4afaf1b26962f75ee4b6 (diff) | |
download | gitlab-ce-427b23c12718bea233931431e7d9307881a960c0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/application.rb')
-rw-r--r-- | config/application.rb | 10 |
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 |