Commit 7a171357 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'lib-gitlab-refactoring-2' into 'master'

Move prepend to the last line in lib/gitlab - 2

See merge request gitlab-org/gitlab!30070
parents e0fe700e 9fc84d1c
---
title: Move prepend to last line in lib/gitlab files
merge_request: 30070
author: Rajendra Kadam
type: fixed
...@@ -29,8 +29,6 @@ module Gitlab ...@@ -29,8 +29,6 @@ module Gitlab
private_constant :REASONS private_constant :REASONS
prepend_if_ee('::EE::Gitlab::Ci::Status::Build::Failed') # rubocop: disable Cop/InjectEnterpriseEditionModule
def status_tooltip def status_tooltip
base_message base_message
end end
...@@ -65,3 +63,5 @@ module Gitlab ...@@ -65,3 +63,5 @@ module Gitlab
end end
end end
end end
Gitlab::Ci::Status::Build::Failed.prepend_if_ee('::EE::Gitlab::Ci::Status::Build::Failed')
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
module Gitlab module Gitlab
module Email module Email
module Handler module Handler
prepend_if_ee('::EE::Gitlab::Email::Handler') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.handlers def self.handlers
@handlers ||= load_handlers @handlers ||= load_handlers
end end
...@@ -27,3 +25,5 @@ module Gitlab ...@@ -27,3 +25,5 @@ module Gitlab
end end
end end
end end
Gitlab::Email::Handler.prepend_if_ee('::EE::Gitlab::Email::Handler')
...@@ -5,8 +5,6 @@ module Gitlab ...@@ -5,8 +5,6 @@ module Gitlab
# The ParallelImporter schedules the importing of a GitHub project using # The ParallelImporter schedules the importing of a GitHub project using
# Sidekiq. # Sidekiq.
class ParallelImporter class ParallelImporter
prepend_if_ee('::EE::Gitlab::GithubImport::ParallelImporter') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :project attr_reader :project
def self.async? def self.async?
...@@ -41,3 +39,5 @@ module Gitlab ...@@ -41,3 +39,5 @@ module Gitlab
end end
end end
end end
Gitlab::GithubImport::ParallelImporter.prepend_if_ee('::EE::Gitlab::GithubImport::ParallelImporter')
...@@ -4,8 +4,6 @@ module Gitlab ...@@ -4,8 +4,6 @@ module Gitlab
module ImportExport module ImportExport
module Project module Project
class RelationFactory < Base::RelationFactory class RelationFactory < Base::RelationFactory
prepend_if_ee('::EE::Gitlab::ImportExport::Project::RelationFactory') # rubocop: disable Cop/InjectEnterpriseEditionModule
OVERRIDES = { snippets: :project_snippets, OVERRIDES = { snippets: :project_snippets,
ci_pipelines: 'Ci::Pipeline', ci_pipelines: 'Ci::Pipeline',
pipelines: 'Ci::Pipeline', pipelines: 'Ci::Pipeline',
...@@ -161,3 +159,5 @@ module Gitlab ...@@ -161,3 +159,5 @@ module Gitlab
end end
end end
end end
Gitlab::ImportExport::Project::RelationFactory.prepend_if_ee('::EE::Gitlab::ImportExport::Project::RelationFactory')
...@@ -4,8 +4,6 @@ module Gitlab ...@@ -4,8 +4,6 @@ module Gitlab
module Middleware module Middleware
class ReadOnly class ReadOnly
class Controller class Controller
prepend_if_ee('EE::Gitlab::Middleware::ReadOnly::Controller') # rubocop: disable Cop/InjectEnterpriseEditionModule
DISALLOWED_METHODS = %w(POST PATCH PUT DELETE).freeze DISALLOWED_METHODS = %w(POST PATCH PUT DELETE).freeze
APPLICATION_JSON = 'application/json' APPLICATION_JSON = 'application/json'
APPLICATION_JSON_TYPES = %W{#{APPLICATION_JSON} application/vnd.git-lfs+json}.freeze APPLICATION_JSON_TYPES = %W{#{APPLICATION_JSON} application/vnd.git-lfs+json}.freeze
...@@ -144,3 +142,5 @@ module Gitlab ...@@ -144,3 +142,5 @@ module Gitlab
end end
end end
end end
Gitlab::Middleware::ReadOnly::Controller.prepend_if_ee('EE::Gitlab::Middleware::ReadOnly::Controller')
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
module Gitlab module Gitlab
class OmniauthInitializer class OmniauthInitializer
prepend_if_ee('::EE::Gitlab::OmniauthInitializer') # rubocop: disable Cop/InjectEnterpriseEditionModule
def initialize(devise_config) def initialize(devise_config)
@devise_config = devise_config @devise_config = devise_config
end end
...@@ -121,3 +119,5 @@ module Gitlab ...@@ -121,3 +119,5 @@ module Gitlab
end end
end end
end end
Gitlab::OmniauthInitializer.prepend_if_ee('::EE::Gitlab::OmniauthInitializer')
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