Commit 407b8ea9 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Move prepend to the last line in lib gitlab files - 1

parent 0a49a02f
---
title: Move prepend to last line in lib/gitlab files
merge_request: 29938
author: Rajendra
type: fixed
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
module Gitlab module Gitlab
module Patch module Patch
module DrawRoute module DrawRoute
prepend_if_ee('EE::Gitlab::Patch::DrawRoute') # rubocop: disable Cop/InjectEnterpriseEditionModule
RoutesNotFound = Class.new(StandardError) RoutesNotFound = Class.new(StandardError)
def draw(routes_name) def draw(routes_name)
...@@ -38,3 +36,5 @@ module Gitlab ...@@ -38,3 +36,5 @@ module Gitlab
end end
end end
end end
Gitlab::Patch::DrawRoute.prepend_if_ee('EE::Gitlab::Patch::DrawRoute')
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
module Gitlab module Gitlab
module Prometheus module Prometheus
class MetricGroup class MetricGroup
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
...@@ -31,3 +30,5 @@ module Gitlab ...@@ -31,3 +30,5 @@ module Gitlab
end end
end end
end end
Gitlab::Prometheus::MetricGroup.prepend_if_ee('EE::Gitlab::Prometheus::MetricGroup')
...@@ -4,8 +4,6 @@ module Gitlab ...@@ -4,8 +4,6 @@ module Gitlab
module Prometheus module Prometheus
module Queries module Queries
module QueryAdditionalMetrics module QueryAdditionalMetrics
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))
.select(&method(:group_with_any_metrics)) .select(&method(:group_with_any_metrics))
...@@ -99,3 +97,5 @@ module Gitlab ...@@ -99,3 +97,5 @@ module Gitlab
end end
end end
end end
Gitlab::Prometheus::Queries::QueryAdditionalMetrics.prepend_if_ee('EE::Gitlab::Prometheus::Queries::QueryAdditionalMetrics')
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
module Gitlab module Gitlab
module Search module Search
class ParsedQuery class ParsedQuery
prepend_if_ee('EE::Gitlab::Search::ParsedQuery') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :term, :filters attr_reader :term, :filters
def initialize(term, filters) def initialize(term, filters)
...@@ -25,3 +23,5 @@ module Gitlab ...@@ -25,3 +23,5 @@ module Gitlab
end end
end end
end end
Gitlab::Search::ParsedQuery.prepend_if_ee('EE::Gitlab::Search::ParsedQuery')
...@@ -4,8 +4,6 @@ module Gitlab ...@@ -4,8 +4,6 @@ module Gitlab
module SlashCommands module SlashCommands
module Presenters module Presenters
module IssueBase module IssueBase
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'
end end
...@@ -51,3 +49,5 @@ module Gitlab ...@@ -51,3 +49,5 @@ module Gitlab
end end
end end
end end
Gitlab::SlashCommands::Presenters::IssueBase.prepend_if_ee('EE::Gitlab::SlashCommands::Presenters::IssueBase')
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
module Gitlab module Gitlab
class TreeSummary class TreeSummary
prepend_if_ee('::EE::Gitlab::TreeSummary') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ::Gitlab::Utils::StrongMemoize include ::Gitlab::Utils::StrongMemoize
CACHE_EXPIRE_IN = 1.hour CACHE_EXPIRE_IN = 1.hour
...@@ -135,3 +133,5 @@ module Gitlab ...@@ -135,3 +133,5 @@ module Gitlab
end end
end end
end end
Gitlab::TreeSummary.prepend_if_ee('::EE::Gitlab::TreeSummary')
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