Commit d4b77f8f authored by Markus Koller's avatar Markus Koller

Drop app/models/integrations from eager load paths

The models in this folder all use the new `Integrations::` namespace,
so they can be properly auto-loaded without having to add the path to
`eager_load_paths`. This was only needed for the old `project_services`
directory, which didn't use namespaces.

This fixes errors like this when referencing integration classes in the
toplevel scope:

```
LoadError: Unable to autoload constant Github, expected ee/app/models/integrations/github.rb to define it
```

Instead we'll now get:

```
NameError: uninitialized constant Github
```

The previous workaround for the Jira integration to create an empty
module in `app/services/jira.rb` isn't needed anymore, referencing a
service like `Jira::requests::Projects::ListService` still works without
raising an error.
parent eeef2847
# frozen_string_literal: true
module Jira
end
......@@ -47,7 +47,6 @@ module Gitlab
config.eager_load_paths.push(*%W[#{config.root}/lib
#{config.root}/app/models/badges
#{config.root}/app/models/hooks
#{config.root}/app/models/integrations
#{config.root}/app/models/members
#{config.root}/app/models/project_services
#{config.root}/app/graphql/resolvers/concerns
......
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