Commit 88874777 authored by Yorick Peterse's avatar Yorick Peterse Committed by Yorick Peterse

Use X_if_ee injection methods for left-over lines

In MR https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14863 we
changed various prepend/include/extend lines to use the new X_if_ee
methods for injecting EE modules. Unfortunately, we forgot to take care
of a variety of lines due to the use of inaccurate patterns to find
these lines.

This commit takes care of moving over the remaining lines, except for
any prepend lines in the ee/ directory as the changes are not needed
there (since this directory is only available in EE).
parent 9c1ff791
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
class LicenseTemplateFinder class LicenseTemplateFinder
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
prepend ::EE::LicenseTemplateFinder # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::LicenseTemplateFinder') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :project, :params attr_reader :project, :params
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
class ProjectsFinder < UnionFinder class ProjectsFinder < UnionFinder
include CustomAttributesFilter include CustomAttributesFilter
prepend ::EE::ProjectsFinder # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::ProjectsFinder') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_accessor :params attr_accessor :params
attr_reader :current_user, :project_ids_relation attr_reader :current_user, :project_ids_relation
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class TemplateFinder class TemplateFinder
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
prepend ::EE::TemplateFinder # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::TemplateFinder') # rubocop: disable Cop/InjectEnterpriseEditionModule
VENDORED_TEMPLATES = HashWithIndifferentAccess.new( VENDORED_TEMPLATES = HashWithIndifferentAccess.new(
dockerfiles: ::Gitlab::Template::DockerfileTemplate, dockerfiles: ::Gitlab::Template::DockerfileTemplate,
......
# frozen_string_literal: true # frozen_string_literal: true
module EnvironmentsHelper module EnvironmentsHelper
prepend ::EE::EnvironmentsHelper # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::EnvironmentsHelper') # rubocop: disable Cop/InjectEnterpriseEditionModule
def environments_list_data def environments_list_data
{ {
......
# frozen_string_literal: true # frozen_string_literal: true
module FormHelper module FormHelper
prepend ::EE::FormHelper # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::FormHelper') # rubocop: disable Cop/InjectEnterpriseEditionModule
def form_errors(model, type: 'form') def form_errors(model, type: 'form')
return unless model.errors.any? return unless model.errors.any?
......
# frozen_string_literal: true # frozen_string_literal: true
module ProjectsHelper module ProjectsHelper
prepend ::EE::ProjectsHelper # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::ProjectsHelper') # rubocop: disable Cop/InjectEnterpriseEditionModule
def link_to_project(project) def link_to_project(project)
link_to namespace_project_path(namespace_id: project.namespace, id: project), title: h(project.name) do link_to namespace_project_path(namespace_id: project.namespace, id: project), title: h(project.name) do
......
# frozen_string_literal: true # frozen_string_literal: true
module SortingHelper module SortingHelper
prepend ::EE::SortingHelper # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::SortingHelper') # rubocop: disable Cop/InjectEnterpriseEditionModule
def sort_options_hash def sort_options_hash
{ {
......
...@@ -7,7 +7,7 @@ class CommitStatus < ApplicationRecord ...@@ -7,7 +7,7 @@ class CommitStatus < ApplicationRecord
include Presentable include Presentable
include EnumWithNil include EnumWithNil
prepend ::EE::CommitStatus # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::CommitStatus') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.table_name = 'ci_builds' self.table_name = 'ci_builds'
......
...@@ -6,7 +6,7 @@ module PrometheusAdapter ...@@ -6,7 +6,7 @@ module PrometheusAdapter
included do included do
include ReactiveCaching include ReactiveCaching
# We can't prepend outside of this model due to the use of `included`, so this must stay here. # We can't prepend outside of this model due to the use of `included`, so this must stay here.
prepend EE::PrometheusAdapter # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::PrometheusAdapter') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reactive_cache_lease_timeout = 30.seconds self.reactive_cache_lease_timeout = 30.seconds
self.reactive_cache_refresh_interval = 30.seconds self.reactive_cache_refresh_interval = 30.seconds
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# A note of this type can be resolvable. # A note of this type can be resolvable.
class DiscussionNote < Note class DiscussionNote < Note
# This prepend must stay here because the `validates` below depends on it. # This prepend must stay here because the `validates` below depends on it.
prepend EE::DiscussionNote # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::DiscussionNote') # rubocop: disable Cop/InjectEnterpriseEditionModule
# Names of all implementers of `Noteable` that support discussions. # Names of all implementers of `Noteable` that support discussions.
def self.noteable_types def self.noteable_types
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Global Milestones are milestones that can be shared across multiple projects # Global Milestones are milestones that can be shared across multiple projects
class GlobalMilestone class GlobalMilestone
include Milestoneish include Milestoneish
include ::EE::GlobalMilestone # rubocop: disable Cop/InjectEnterpriseEditionModule include_if_ee('::EE::GlobalMilestone') # rubocop: disable Cop/InjectEnterpriseEditionModule
STATE_COUNT_HASH = { opened: 0, closed: 0, all: 0 }.freeze STATE_COUNT_HASH = { opened: 0, closed: 0, all: 0 }.freeze
......
# frozen_string_literal: true # frozen_string_literal: true
# Group Milestones are milestones that can be shared among many projects within the same group # Group Milestones are milestones that can be shared among many projects within the same group
class GroupMilestone < GlobalMilestone class GroupMilestone < GlobalMilestone
include ::EE::GroupMilestone # rubocop: disable Cop/InjectEnterpriseEditionModule include_if_ee('::EE::GroupMilestone') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :group, :milestones attr_reader :group, :milestones
def self.build_collection(group, projects, params) def self.build_collection(group, projects, params)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class List < ApplicationRecord class List < ApplicationRecord
include Importable include Importable
prepend ::EE::List # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::List') # rubocop: disable Cop/InjectEnterpriseEditionModule
belongs_to :board belongs_to :board
belongs_to :label belongs_to :label
......
# frozen_string_literal: true # frozen_string_literal: true
class MembersPreloader class MembersPreloader
prepend EE::MembersPreloader # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::MembersPreloader') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :members attr_reader :members
......
...@@ -23,7 +23,7 @@ class MergeRequest < ApplicationRecord ...@@ -23,7 +23,7 @@ class MergeRequest < ApplicationRecord
SORTING_PREFERENCE_FIELD = :merge_requests_sort SORTING_PREFERENCE_FIELD = :merge_requests_sort
prepend ::EE::MergeRequest # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::MergeRequest') # rubocop: disable Cop/InjectEnterpriseEditionModule
belongs_to :target_project, class_name: "Project" belongs_to :target_project, class_name: "Project"
belongs_to :source_project, class_name: "Project" belongs_to :source_project, class_name: "Project"
......
...@@ -18,7 +18,7 @@ class Milestone < ApplicationRecord ...@@ -18,7 +18,7 @@ class Milestone < ApplicationRecord
include Milestoneish include Milestoneish
include Gitlab::SQL::Pattern include Gitlab::SQL::Pattern
prepend ::EE::Milestone # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Milestone') # rubocop: disable Cop/InjectEnterpriseEditionModule
cache_markdown_field :title, pipeline: :single_line cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description cache_markdown_field :description
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class ProjectAuthorization < ApplicationRecord class ProjectAuthorization < ApplicationRecord
include FromUnion include FromUnion
prepend ::EE::ProjectAuthorization # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::ProjectAuthorization') # rubocop: disable Cop/InjectEnterpriseEditionModule
belongs_to :user belongs_to :user
belongs_to :project belongs_to :project
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'carrierwave/orm/activerecord' require 'carrierwave/orm/activerecord'
class ProjectImportData < ApplicationRecord class ProjectImportData < ApplicationRecord
prepend ::EE::ProjectImportData # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::ProjectImportData') # rubocop: disable Cop/InjectEnterpriseEditionModule
belongs_to :project, inverse_of: :import_data belongs_to :project, inverse_of: :import_data
attr_encrypted :credentials, attr_encrypted :credentials,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module ChatMessage module ChatMessage
class MergeMessage < BaseMessage class MergeMessage < BaseMessage
prepend ::EE::ChatMessage::MergeMessage # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::ChatMessage::MergeMessage') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :merge_request_iid attr_reader :merge_request_iid
attr_reader :source_branch attr_reader :source_branch
......
...@@ -18,7 +18,7 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated ...@@ -18,7 +18,7 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
presents :build presents :build
prepend ::EE::CommitStatusPresenter # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::CommitStatusPresenter') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.callout_failure_messages def self.callout_failure_messages
CALLOUT_FAILURE_MESSAGES CALLOUT_FAILURE_MESSAGES
......
# frozen_string_literal: true # frozen_string_literal: true
class BuildDetailsEntity < JobEntity class BuildDetailsEntity < JobEntity
prepend ::EE::BuildDetailEntity # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::BuildDetailEntity') # rubocop: disable Cop/InjectEnterpriseEditionModule
expose :coverage, :erased_at, :duration expose :coverage, :erased_at, :duration
expose :tag_list, as: :tags expose :tag_list, as: :tags
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class IssueEntity < IssuableEntity class IssueEntity < IssuableEntity
include TimeTrackableEntity include TimeTrackableEntity
prepend ::EE::IssueEntity # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::IssueEntity') # rubocop: disable Cop/InjectEnterpriseEditionModule
expose :state expose :state
expose :milestone_id expose :milestone_id
......
# frozen_string_literal: true # frozen_string_literal: true
class ProjectMirrorEntity < Grape::Entity class ProjectMirrorEntity < Grape::Entity
prepend ::EE::ProjectMirrorEntity # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::ProjectMirrorEntity') # rubocop: disable Cop/InjectEnterpriseEditionModule
expose :id expose :id
......
...@@ -137,7 +137,7 @@ module ObjectStorage ...@@ -137,7 +137,7 @@ module ObjectStorage
included do |base| included do |base|
base.include(ObjectStorage) base.include(ObjectStorage)
include ::EE::ObjectStorage::Concern # rubocop: disable Cop/InjectEnterpriseEditionModule include_if_ee('::EE::ObjectStorage::Concern') # rubocop: disable Cop/InjectEnterpriseEditionModule
after :migrate, :delete_migrated_file after :migrate, :delete_migrated_file
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module RepositoryCheck module RepositoryCheck
class BatchWorker class BatchWorker
prepend ::EE::RepositoryCheck::BatchWorker # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::RepositoryCheck::BatchWorker') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ApplicationWorker include ApplicationWorker
include RepositoryCheckQueue include RepositoryCheckQueue
......
...@@ -5,7 +5,7 @@ module RepositoryCheck ...@@ -5,7 +5,7 @@ module RepositoryCheck
include ApplicationWorker include ApplicationWorker
include RepositoryCheckQueue include RepositoryCheckQueue
prepend ::EE::RepositoryCheck::SingleRepositoryWorker # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::RepositoryCheck::SingleRepositoryWorker') # rubocop: disable Cop/InjectEnterpriseEditionModule
def perform(project_id) def perform(project_id)
project = Project.find(project_id) project = Project.find(project_id)
......
...@@ -41,7 +41,7 @@ module API ...@@ -41,7 +41,7 @@ module API
# Helper Methods for Grape Endpoint # Helper Methods for Grape Endpoint
module HelperMethods module HelperMethods
prepend EE::API::APIGuard::HelperMethods # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::APIGuard::HelperMethods') # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Auth::UserAuthFinders include Gitlab::Auth::UserAuthFinders
def find_current_user! def find_current_user!
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
include BoardsResponses include BoardsResponses
include PaginationParams include PaginationParams
prepend EE::API::BoardsResponses # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::BoardsResponses') # rubocop: disable Cop/InjectEnterpriseEditionModule
before { authenticate! } before { authenticate! }
......
...@@ -5,7 +5,7 @@ module API ...@@ -5,7 +5,7 @@ module API
include BoardsResponses include BoardsResponses
include PaginationParams include PaginationParams
prepend EE::API::BoardsResponses # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::BoardsResponses') # rubocop: disable Cop/InjectEnterpriseEditionModule
before do before do
authenticate! authenticate!
......
...@@ -16,7 +16,7 @@ module API ...@@ -16,7 +16,7 @@ module API
end end
end end
prepend EE::API::GroupClusters # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::GroupClusters') # rubocop: disable Cop/InjectEnterpriseEditionModule
params do params do
requires :id, type: String, desc: 'The ID of the group' requires :id, type: String, desc: 'The ID of the group'
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module API module API
module Helpers module Helpers
module ProjectSnapshotsHelpers module ProjectSnapshotsHelpers
prepend ::EE::API::Helpers::ProjectSnapshotsHelpers # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::API::Helpers::ProjectSnapshotsHelpers') # rubocop: disable Cop/InjectEnterpriseEditionModule
def authorize_read_git_snapshot! def authorize_read_git_snapshot!
authenticated_with_full_private_access! authenticated_with_full_private_access!
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module API module API
module Helpers module Helpers
module Runner module Runner
prepend EE::API::Helpers::Runner # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::Helpers::Runner') # rubocop: disable Cop/InjectEnterpriseEditionModule
JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN'.freeze JOB_TOKEN_HEADER = 'HTTP_JOB_TOKEN'.freeze
JOB_TOKEN_PARAM = :token JOB_TOKEN_PARAM = :token
......
...@@ -11,7 +11,7 @@ module API ...@@ -11,7 +11,7 @@ module API
end end
end end
prepend EE::API::JobArtifacts # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::JobArtifacts') # rubocop: disable Cop/InjectEnterpriseEditionModule
params do params do
requires :id, type: String, desc: 'The ID of a project' requires :id, type: String, desc: 'The ID of a project'
......
...@@ -33,7 +33,7 @@ module API ...@@ -33,7 +33,7 @@ module API
] ]
end end
prepend EE::API::MergeRequests # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::MergeRequests') # rubocop: disable Cop/InjectEnterpriseEditionModule
helpers do helpers do
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -17,7 +17,7 @@ module API ...@@ -17,7 +17,7 @@ module API
end end
end end
prepend EE::API::Namespaces # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::Namespaces') # rubocop: disable Cop/InjectEnterpriseEditionModule
resource :namespaces do resource :namespaces do
desc 'Get a namespaces list' do desc 'Get a namespaces list' do
......
...@@ -16,7 +16,7 @@ module API ...@@ -16,7 +16,7 @@ module API
end end
end end
prepend EE::API::ProjectClusters # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::API::ProjectClusters') # rubocop: disable Cop/InjectEnterpriseEditionModule
params do params do
requires :id, type: String, desc: 'The ID of the project' requires :id, type: String, desc: 'The ID of the project'
......
...@@ -4,7 +4,7 @@ module Banzai ...@@ -4,7 +4,7 @@ module Banzai
module Filter module Filter
# The actual filter is implemented in the EE mixin # The actual filter is implemented in the EE mixin
class EpicReferenceFilter < IssuableReferenceFilter class EpicReferenceFilter < IssuableReferenceFilter
prepend EE::Banzai::Filter::EpicReferenceFilter # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Banzai::Filter::EpicReferenceFilter') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reference_type = :epic self.reference_type = :epic
......
...@@ -9,7 +9,7 @@ module Banzai ...@@ -9,7 +9,7 @@ module Banzai
# so we can avoid N+1 queries problem # so we can avoid N+1 queries problem
class IssuableExtractor class IssuableExtractor
prepend EE::Banzai::IssuableExtractor # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Banzai::IssuableExtractor') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :context attr_reader :context
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Banzai module Banzai
module Pipeline module Pipeline
class GfmPipeline < BasePipeline class GfmPipeline < BasePipeline
prepend EE::Banzai::Pipeline::GfmPipeline # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Banzai::Pipeline::GfmPipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
# These filters transform GitLab Flavored Markdown (GFM) to HTML. # These filters transform GitLab Flavored Markdown (GFM) to HTML.
# The nodes and marks referenced in app/assets/javascripts/behaviors/markdown/editor_extensions.js # The nodes and marks referenced in app/assets/javascripts/behaviors/markdown/editor_extensions.js
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Banzai module Banzai
module Pipeline module Pipeline
class PostProcessPipeline < BasePipeline class PostProcessPipeline < BasePipeline
prepend EE::Banzai::Pipeline::PostProcessPipeline # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Banzai::Pipeline::PostProcessPipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.filters def self.filters
@filters ||= FilterArray[ @filters ||= FilterArray[
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Banzai module Banzai
module Pipeline module Pipeline
class SingleLinePipeline < GfmPipeline class SingleLinePipeline < GfmPipeline
prepend EE::Banzai::Pipeline::SingleLinePipeline # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Banzai::Pipeline::SingleLinePipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.filters def self.filters
@filters ||= FilterArray[ @filters ||= FilterArray[
......
...@@ -4,7 +4,7 @@ module Banzai ...@@ -4,7 +4,7 @@ module Banzai
module ReferenceParser module ReferenceParser
# The actual parser is implemented in the EE mixin # The actual parser is implemented in the EE mixin
class EpicParser < IssuableParser class EpicParser < IssuableParser
prepend ::EE::Banzai::ReferenceParser::EpicParser # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Banzai::ReferenceParser::EpicParser') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reference_type = :epic self.reference_type = :epic
......
...@@ -4,7 +4,7 @@ require 'flipper/adapters/active_record' ...@@ -4,7 +4,7 @@ require 'flipper/adapters/active_record'
require 'flipper/adapters/active_support_cache_store' require 'flipper/adapters/active_support_cache_store'
class Feature class Feature
prepend EE::Feature # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Feature') # rubocop: disable Cop/InjectEnterpriseEditionModule
# Classes to override flipper table names # Classes to override flipper table names
class FlipperFeature < Flipper::Adapters::ActiveRecord::Feature class FlipperFeature < Flipper::Adapters::ActiveRecord::Feature
......
...@@ -26,7 +26,7 @@ module Gitlab ...@@ -26,7 +26,7 @@ module Gitlab
DEFAULT_SCOPES = [:api].freeze DEFAULT_SCOPES = [:api].freeze
class << self class << self
prepend EE::Gitlab::Auth # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Auth') # rubocop: disable Cop/InjectEnterpriseEditionModule
def omniauth_enabled? def omniauth_enabled?
Gitlab.config.omniauth.enabled Gitlab.config.omniauth.enabled
......
...@@ -8,7 +8,7 @@ module Gitlab ...@@ -8,7 +8,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Access class Access
prepend ::EE::Gitlab::Auth::LDAP::Access # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::LDAP::Access') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :provider, :user, :ldap_identity attr_reader :provider, :user, :ldap_identity
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Adapter class Adapter
prepend ::EE::Gitlab::Auth::LDAP::Adapter # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::LDAP::Adapter') # rubocop: disable Cop/InjectEnterpriseEditionModule
SEARCH_RETRY_FACTOR = [1, 1, 2, 3].freeze SEARCH_RETRY_FACTOR = [1, 1, 2, 3].freeze
MAX_SEARCH_RETRIES = Rails.env.test? ? 1 : SEARCH_RETRY_FACTOR.size.freeze MAX_SEARCH_RETRIES = Rails.env.test? ? 1 : SEARCH_RETRY_FACTOR.size.freeze
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Config class Config
prepend ::EE::Gitlab::Auth::LDAP::Config # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::LDAP::Config') # rubocop: disable Cop/InjectEnterpriseEditionModule
NET_LDAP_ENCRYPTION_METHOD = { NET_LDAP_ENCRYPTION_METHOD = {
simple_tls: :simple_tls, simple_tls: :simple_tls,
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Auth module Auth
module LDAP module LDAP
class Person class Person
prepend ::EE::Gitlab::Auth::LDAP::Person # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::LDAP::Person') # rubocop: disable Cop/InjectEnterpriseEditionModule
# Active Directory-specific LDAP filter that checks if bit 2 of the # Active Directory-specific LDAP filter that checks if bit 2 of the
# userAccountControl attribute is set. # userAccountControl attribute is set.
......
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
module LDAP module LDAP
class User < Gitlab::Auth::OAuth::User class User < Gitlab::Auth::OAuth::User
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
prepend ::EE::Gitlab::Auth::LDAP::User # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::LDAP::User') # rubocop: disable Cop/InjectEnterpriseEditionModule
class << self class << self
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
......
...@@ -6,7 +6,7 @@ module Gitlab ...@@ -6,7 +6,7 @@ module Gitlab
module Auth module Auth
module OAuth module OAuth
class AuthHash class AuthHash
prepend ::EE::Gitlab::Auth::OAuth::AuthHash # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::OAuth::AuthHash') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :auth_hash attr_reader :auth_hash
def initialize(auth_hash) def initialize(auth_hash)
......
...@@ -9,7 +9,7 @@ module Gitlab ...@@ -9,7 +9,7 @@ module Gitlab
module Auth module Auth
module OAuth module OAuth
class User class User
prepend ::EE::Gitlab::Auth::OAuth::User # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::OAuth::User') # rubocop: disable Cop/InjectEnterpriseEditionModule
SignupDisabledError = Class.new(StandardError) SignupDisabledError = Class.new(StandardError)
SigninDisabledForProviderError = Class.new(StandardError) SigninDisabledForProviderError = Class.new(StandardError)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Auth module Auth
Result = Struct.new(:actor, :project, :type, :authentication_abilities) do Result = Struct.new(:actor, :project, :type, :authentication_abilities) do
prepend ::EE::Gitlab::Auth::Result # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::Result') # rubocop: disable Cop/InjectEnterpriseEditionModule
def ci?(for_project) def ci?(for_project)
type == :ci && type == :ci &&
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Auth module Auth
module Saml module Saml
class Config class Config
prepend ::EE::Gitlab::Auth::Saml::Config # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::Saml::Config') # rubocop: disable Cop/InjectEnterpriseEditionModule
class << self class << self
def options def options
......
...@@ -9,7 +9,7 @@ module Gitlab ...@@ -9,7 +9,7 @@ module Gitlab
module Auth module Auth
module Saml module Saml
class User < Gitlab::Auth::OAuth::User class User < Gitlab::Auth::OAuth::User
prepend ::EE::Gitlab::Auth::Saml::User # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::Saml::User') # rubocop: disable Cop/InjectEnterpriseEditionModule
extend ::Gitlab::Utils::Override extend ::Gitlab::Utils::Override
......
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
end end
module UserAuthFinders module UserAuthFinders
prepend ::EE::Gitlab::Auth::UserAuthFinders # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Auth::UserAuthFinders') # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Checks module Checks
class BaseChecker class BaseChecker
prepend EE::Gitlab::Checks::BaseChecker # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Checks::BaseChecker') # rubocop: disable Cop/InjectEnterpriseEditionModule
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
attr_reader :change_access attr_reader :change_access
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Checks module Checks
class ChangeAccess class ChangeAccess
prepend EE::Gitlab::Checks::ChangeAccess # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Checks::ChangeAccess') # rubocop: disable Cop/InjectEnterpriseEditionModule
ATTRIBUTES = %i[user_access project skip_authorization ATTRIBUTES = %i[user_access project skip_authorization
skip_lfs_integrity_check protocol oldrev newrev ref skip_lfs_integrity_check protocol oldrev newrev ref
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Checks module Checks
class DiffCheck < BaseChecker class DiffCheck < BaseChecker
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
prepend EE::Gitlab::Checks::DiffCheck # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Checks::DiffCheck') # rubocop: disable Cop/InjectEnterpriseEditionModule
LOG_MESSAGES = { LOG_MESSAGES = {
validate_file_paths: "Validating diffs' file paths...", validate_file_paths: "Validating diffs' file paths...",
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Ci module Ci
module Parsers module Parsers
prepend ::EE::Gitlab::Ci::Parsers # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Ci::Parsers') # rubocop: disable Cop/InjectEnterpriseEditionModule
ParserNotFoundError = Class.new(ParserError) ParserNotFoundError = Class.new(ParserError)
......
...@@ -21,7 +21,7 @@ module Gitlab ...@@ -21,7 +21,7 @@ module Gitlab
private_constant :REASONS private_constant :REASONS
prepend ::EE::Gitlab::Ci::Status::Build::Failed # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Ci::Status::Build::Failed') # rubocop: disable Cop/InjectEnterpriseEditionModule
def status_tooltip def status_tooltip
base_message base_message
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Email module Email
module Handler module Handler
prepend ::EE::Gitlab::Email::Handler # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::Email::Handler') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.handlers def self.handlers
@handlers ||= load_handlers @handlers ||= load_handlers
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module EtagCaching module EtagCaching
class Router class Router
prepend EE::Gitlab::EtagCaching::Router # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::EtagCaching::Router') # rubocop: disable Cop/InjectEnterpriseEditionModule
Route = Struct.new(:regexp, :name) Route = Struct.new(:regexp, :name)
# We enable an ETag for every request matching the regex. # We enable an ETag for every request matching the regex.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
class GitAccessWiki < GitAccess class GitAccessWiki < GitAccess
prepend EE::Gitlab::GitAccessWiki # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::GitAccessWiki') # rubocop: disable Cop/InjectEnterpriseEditionModule
ERROR_MESSAGES = { ERROR_MESSAGES = {
read_only: "You can't push code to a read-only GitLab instance.", read_only: "You can't push code to a read-only GitLab instance.",
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ 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 ::EE::Gitlab::GithubImport::ParallelImporter # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::GithubImport::ParallelImporter') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :project attr_reader :project
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module ImportExport module ImportExport
class RelationFactory class RelationFactory
prepend ::EE::Gitlab::ImportExport::RelationFactory # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::ImportExport::RelationFactory') # rubocop: disable Cop/InjectEnterpriseEditionModule
OVERRIDES = { snippets: :project_snippets, OVERRIDES = { snippets: :project_snippets,
ci_pipelines: 'Ci::Pipeline', ci_pipelines: 'Ci::Pipeline',
......
...@@ -25,7 +25,7 @@ module Gitlab ...@@ -25,7 +25,7 @@ module Gitlab
].freeze ].freeze
class << self class << self
prepend EE::Gitlab::ImportSources # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::ImportSources') # rubocop: disable Cop/InjectEnterpriseEditionModule
def options def options
Hash[import_table.map { |importer| [importer.title, importer.name] }] Hash[import_table.map { |importer| [importer.title, importer.name] }]
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Middleware module Middleware
class ReadOnly class ReadOnly
class Controller class Controller
prepend EE::Gitlab::Middleware::ReadOnly::Controller # rubocop: disable Cop/InjectEnterpriseEditionModule 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'.freeze APPLICATION_JSON = 'application/json'.freeze
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
class OmniauthInitializer class OmniauthInitializer
prepend ::EE::Gitlab::OmniauthInitializer # rubocop: disable Cop/InjectEnterpriseEditionModule 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
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
module Gitlab module Gitlab
module Patch module Patch
module DrawRoute module DrawRoute
prepend EE::Gitlab::Patch::DrawRoute # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Patch::DrawRoute') # rubocop: disable Cop/InjectEnterpriseEditionModule
RoutesNotFound = Class.new(StandardError) RoutesNotFound = Class.new(StandardError)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Prometheus module Prometheus
class MetricGroup class MetricGroup
prepend EE::Gitlab::Prometheus::MetricGroup # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Prometheus::MetricGroup') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ActiveModel::Model include ActiveModel::Model
attr_accessor :name, :priority, :metrics attr_accessor :name, :priority, :metrics
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module Prometheus module Prometheus
module Queries module Queries
module QueryAdditionalMetrics module QueryAdditionalMetrics
prepend EE::Gitlab::Prometheus::Queries::QueryAdditionalMetrics # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Prometheus::Queries::QueryAdditionalMetrics') # rubocop: disable Cop/InjectEnterpriseEditionModule
def query_metrics(project, environment, query_context) def query_metrics(project, environment, query_context)
matched_metrics(project).map(&query_group(query_context)) matched_metrics(project).map(&query_group(query_context))
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Gitlab module Gitlab
module Search module Search
class ParsedQuery class ParsedQuery
prepend EE::Gitlab::Search::ParsedQuery # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::Search::ParsedQuery') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :term, :filters attr_reader :term, :filters
......
...@@ -4,7 +4,7 @@ module Gitlab ...@@ -4,7 +4,7 @@ module Gitlab
module SlashCommands module SlashCommands
module Presenters module Presenters
module IssueBase module IssueBase
prepend EE::Gitlab::SlashCommands::Presenters::IssueBase # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('EE::Gitlab::SlashCommands::Presenters::IssueBase') # rubocop: disable Cop/InjectEnterpriseEditionModule
def color(issuable) def color(issuable)
issuable.open? ? '#38ae67' : '#d22852' issuable.open? ? '#38ae67' : '#d22852'
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Gitlab module Gitlab
class TreeSummary class TreeSummary
prepend ::EE::Gitlab::TreeSummary # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('::EE::Gitlab::TreeSummary') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ::Gitlab::Utils::StrongMemoize include ::Gitlab::Utils::StrongMemoize
......
...@@ -4,7 +4,7 @@ module QA ...@@ -4,7 +4,7 @@ module QA
module Page module Page
module Admin module Admin
class Menu < Page::Base class Menu < Page::Base
prepend EE::Page::Admin::Menu # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('QA::EE::Page::Admin::Menu')
view 'app/views/layouts/nav/sidebar/_admin.html.haml' do view 'app/views/layouts/nav/sidebar/_admin.html.haml' do
element :admin_sidebar element :admin_sidebar
......
...@@ -109,4 +109,4 @@ module QA ...@@ -109,4 +109,4 @@ module QA
end end
end end
QA::Page::Project::Issue::Show.prepend(QA::EE::Page::Project::Issue::Show) QA::Page::Project::Issue::Show.prepend_if_ee('QA::EE::Page::Project::Issue::Show')
...@@ -40,4 +40,4 @@ module QA ...@@ -40,4 +40,4 @@ module QA
end end
end end
QA::Page::Project::Menu.prepend(QA::EE::Page::Project::SubMenus::SecurityCompliance) QA::Page::Project::Menu.prepend_if_ee('QA::EE::Page::Project::SubMenus::SecurityCompliance')
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
module Project module Project
class New < Page::Base class New < Page::Base
include Page::Component::Select2 include Page::Component::Select2
prepend EE::Page::Project::New # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('QA::EE::Page::Project::New')
view 'app/views/projects/new.html.haml' do view 'app/views/projects/new.html.haml' do
element :project_create_from_template_tab element :project_create_from_template_tab
......
...@@ -54,4 +54,4 @@ module QA ...@@ -54,4 +54,4 @@ module QA
end end
end end
QA::Page::Project::Operations::Kubernetes::Show.prepend(QA::EE::Page::Project::Operations::Kubernetes::Show) QA::Page::Project::Operations::Kubernetes::Show.prepend_if_ee('QA::EE::Page::Project::Operations::Kubernetes::Show')
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
module Project module Project
module Settings module Settings
class MirroringRepositories < Page::Base class MirroringRepositories < Page::Base
prepend EE::Page::Project::Settings::MirroringRepositories # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('QA::EE::Page::Project::Settings::MirroringRepositories')
view 'app/views/projects/mirrors/_authentication_method.html.haml' do view 'app/views/projects/mirrors/_authentication_method.html.haml' do
element :authentication_method element :authentication_method
......
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
module Project module Project
module Settings module Settings
class ProtectedBranches < Page::Base class ProtectedBranches < Page::Base
prepend EE::Page::Project::Settings::ProtectedBranches # rubocop: disable Cop/InjectEnterpriseEditionModule prepend_if_ee('QA::EE::Page::Project::Settings::ProtectedBranches')
view 'app/views/projects/protected_branches/shared/_dropdown.html.haml' do view 'app/views/projects/protected_branches/shared/_dropdown.html.haml' do
element :protected_branch_select element :protected_branch_select
......
...@@ -57,4 +57,4 @@ module QA ...@@ -57,4 +57,4 @@ module QA
end end
end end
QA::Scenario::Test::Sanity::Selectors.prepend(QA::EE::Scenario::Test::Sanity::Selectors) QA::Scenario::Test::Sanity::Selectors.prepend_if_ee('QA::EE::Scenario::Test::Sanity::Selectors')
...@@ -14,4 +14,4 @@ module DbCleaner ...@@ -14,4 +14,4 @@ module DbCleaner
end end
end end
DbCleaner.prepend(EE::DbCleaner) DbCleaner.prepend_if_ee('EE::DbCleaner')
...@@ -71,4 +71,4 @@ module LdapHelpers ...@@ -71,4 +71,4 @@ module LdapHelpers
end end
end end
LdapHelpers.include(EE::LdapHelpers) LdapHelpers.include_if_ee('EE::LdapHelpers')
...@@ -7,4 +7,4 @@ module LicenseHelpers ...@@ -7,4 +7,4 @@ module LicenseHelpers
end end
end end
LicenseHelpers.prepend(EE::LicenseHelpers) LicenseHelpers.prepend_if_ee('EE::LicenseHelpers')
...@@ -212,4 +212,4 @@ module LoginHelpers ...@@ -212,4 +212,4 @@ module LoginHelpers
end end
end end
LoginHelpers.prepend(EE::LoginHelpers) LoginHelpers.prepend_if_ee('EE::LoginHelpers')
...@@ -134,4 +134,4 @@ module MigrationsHelpers ...@@ -134,4 +134,4 @@ module MigrationsHelpers
end end
end end
MigrationsHelpers.prepend(EE::MigrationsHelpers) MigrationsHelpers.prepend_if_ee('EE::MigrationsHelpers')
...@@ -146,4 +146,4 @@ end ...@@ -146,4 +146,4 @@ end
require_relative '../../../ee/spec/support/helpers/ee/stub_configuration' if require_relative '../../../ee/spec/support/helpers/ee/stub_configuration' if
Dir.exist?("#{__dir__}/../../../ee") Dir.exist?("#{__dir__}/../../../ee")
StubConfiguration.prepend(EE::StubConfiguration) StubConfiguration.prepend_if_ee('EE::StubConfiguration')
...@@ -140,4 +140,4 @@ module StubGitlabCalls ...@@ -140,4 +140,4 @@ module StubGitlabCalls
end end
end end
StubGitlabCalls.prepend(EE::StubGitlabCalls) StubGitlabCalls.prepend_if_ee('EE::StubGitlabCalls')
...@@ -79,4 +79,4 @@ end ...@@ -79,4 +79,4 @@ end
require_relative '../../../ee/spec/support/helpers/ee/stub_object_storage' if require_relative '../../../ee/spec/support/helpers/ee/stub_object_storage' if
Dir.exist?("#{__dir__}/../../../ee") Dir.exist?("#{__dir__}/../../../ee")
StubObjectStorage.prepend(EE::StubObjectStorage) StubObjectStorage.prepend_if_ee('EE::StubObjectStorage')
...@@ -422,5 +422,5 @@ end ...@@ -422,5 +422,5 @@ end
require_relative '../../../ee/spec/support/helpers/ee/test_env' require_relative '../../../ee/spec/support/helpers/ee/test_env'
::TestEnv.prepend(::EE::TestEnv) ::TestEnv.prepend_if_ee('::EE::TestEnv')
::TestEnv.extend(::EE::TestEnv) ::TestEnv.extend_if_ee('::EE::TestEnv')
...@@ -231,4 +231,4 @@ module RSpec::Matchers::DSL::Macros ...@@ -231,4 +231,4 @@ module RSpec::Matchers::DSL::Macros
end end
end end
MarkdownMatchers.prepend(EE::MarkdownMatchers) MarkdownMatchers.prepend_if_ee('EE::MarkdownMatchers')
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