Commit b6d57464 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'rc/add-ee-controllers-concerns-to-eager-loaded-paths' into 'master'

Automatically add EE paths to eager loaded paths based on the CE paths

See merge request gitlab-org/gitlab-ee!3166
parents c8942241 411387eb
......@@ -37,21 +37,13 @@ module Gitlab
config.generators.templates.push("#{config.root}/generator_templates")
# EE specific paths.
config.eager_load_paths.push(*%W[
#{config.root}/ee/lib
#{config.root}/ee/app/controllers
#{config.root}/ee/app/helpers
#{config.root}/ee/app/mailers
#{config.root}/ee/app/models
#{config.root}/ee/app/models/concerns
#{config.root}/ee/app/policies
#{config.root}/ee/app/serializers
#{config.root}/ee/app/presenters
#{config.root}/ee/app/services
#{config.root}/ee/app/workers
])
ee_paths = config.eager_load_paths.each_with_object([]) do |path, memo|
ee_path = config.root.join('ee', Pathname.new(path).relative_path_from(config.root))
memo << ee_path.to_s if ee_path.exist?
end
config.eager_load_paths.concat(ee_paths)
config.paths['app/views'].push(*%W[
config.paths['app/views'].concat(%W[
#{config.root}/ee/app/views
])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment