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 @@
module Gitlab
module Patch
module DrawRoute
prepend_if_ee('EE::Gitlab::Patch::DrawRoute') # rubocop: disable Cop/InjectEnterpriseEditionModule
RoutesNotFound = Class.new(StandardError)
def draw(routes_name)
......@@ -38,3 +36,5 @@ module Gitlab
end
end
end
Gitlab::Patch::DrawRoute.prepend_if_ee('EE::Gitlab::Patch::DrawRoute')
......@@ -3,7 +3,6 @@
module Gitlab
module Prometheus
class MetricGroup
prepend_if_ee('EE::Gitlab::Prometheus::MetricGroup') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ActiveModel::Model
attr_accessor :name, :priority, :metrics
......@@ -31,3 +30,5 @@ module Gitlab
end
end
end
Gitlab::Prometheus::MetricGroup.prepend_if_ee('EE::Gitlab::Prometheus::MetricGroup')
......@@ -4,8 +4,6 @@ module Gitlab
module Prometheus
module Queries
module QueryAdditionalMetrics
prepend_if_ee('EE::Gitlab::Prometheus::Queries::QueryAdditionalMetrics') # rubocop: disable Cop/InjectEnterpriseEditionModule
def query_metrics(project, environment, query_context)
matched_metrics(project).map(&query_group(query_context))
.select(&method(:group_with_any_metrics))
......@@ -99,3 +97,5 @@ module Gitlab
end
end
end
Gitlab::Prometheus::Queries::QueryAdditionalMetrics.prepend_if_ee('EE::Gitlab::Prometheus::Queries::QueryAdditionalMetrics')
......@@ -3,8 +3,6 @@
module Gitlab
module Search
class ParsedQuery
prepend_if_ee('EE::Gitlab::Search::ParsedQuery') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :term, :filters
def initialize(term, filters)
......@@ -25,3 +23,5 @@ module Gitlab
end
end
end
Gitlab::Search::ParsedQuery.prepend_if_ee('EE::Gitlab::Search::ParsedQuery')
......@@ -4,8 +4,6 @@ module Gitlab
module SlashCommands
module Presenters
module IssueBase
prepend_if_ee('EE::Gitlab::SlashCommands::Presenters::IssueBase') # rubocop: disable Cop/InjectEnterpriseEditionModule
def color(issuable)
issuable.open? ? '#38ae67' : '#d22852'
end
......@@ -51,3 +49,5 @@ module Gitlab
end
end
end
Gitlab::SlashCommands::Presenters::IssueBase.prepend_if_ee('EE::Gitlab::SlashCommands::Presenters::IssueBase')
......@@ -2,8 +2,6 @@
module Gitlab
class TreeSummary
prepend_if_ee('::EE::Gitlab::TreeSummary') # rubocop: disable Cop/InjectEnterpriseEditionModule
include ::Gitlab::Utils::StrongMemoize
CACHE_EXPIRE_IN = 1.hour
......@@ -135,3 +133,5 @@ module Gitlab
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