Commit 5b1879b1 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch 'pl-rubocop-prepend-ee-banzai' into 'master'

Prepend EE modules in the last line for Banzai

See merge request gitlab-org/gitlab!29248
parents 8eb2ad31 47b64f2d
......@@ -4,8 +4,6 @@ module Banzai
module Filter
# The actual filter is implemented in the EE mixin
class EpicReferenceFilter < IssuableReferenceFilter
prepend_if_ee('EE::Banzai::Filter::EpicReferenceFilter') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reference_type = :epic
def self.object_class
......@@ -20,3 +18,5 @@ module Banzai
end
end
end
Banzai::Filter::EpicReferenceFilter.prepend_if_ee('EE::Banzai::Filter::EpicReferenceFilter')
......@@ -9,8 +9,6 @@ module Banzai
# so we can avoid N+1 queries problem
class IssuableExtractor
prepend_if_ee('EE::Banzai::IssuableExtractor') # rubocop: disable Cop/InjectEnterpriseEditionModule
attr_reader :context
ISSUE_REFERENCE_TYPE = '@data-reference-type="issue"'
......@@ -59,3 +57,5 @@ module Banzai
end
end
end
Banzai::IssuableExtractor.prepend_if_ee('EE::Banzai::IssuableExtractor')
......@@ -3,8 +3,6 @@
module Banzai
module Pipeline
class GfmPipeline < BasePipeline
prepend_if_ee('EE::Banzai::Pipeline::GfmPipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
# These filters transform GitLab Flavored Markdown (GFM) to HTML.
# The nodes and marks referenced in app/assets/javascripts/behaviors/markdown/editor_extensions.js
# consequently transform that same HTML to GFM to be copied to the clipboard.
......@@ -77,3 +75,5 @@ module Banzai
end
end
end
Banzai::Pipeline::GfmPipeline.prepend_if_ee('EE::Banzai::Pipeline::GfmPipeline')
......@@ -3,8 +3,6 @@
module Banzai
module Pipeline
class PostProcessPipeline < BasePipeline
prepend_if_ee('EE::Banzai::Pipeline::PostProcessPipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.filters
@filters ||= FilterArray[
*internal_link_filters,
......@@ -34,3 +32,5 @@ module Banzai
end
end
end
Banzai::Pipeline::PostProcessPipeline.prepend_if_ee('EE::Banzai::Pipeline::PostProcessPipeline')
......@@ -3,8 +3,6 @@
module Banzai
module Pipeline
class SingleLinePipeline < GfmPipeline
prepend_if_ee('EE::Banzai::Pipeline::SingleLinePipeline') # rubocop: disable Cop/InjectEnterpriseEditionModule
def self.filters
@filters ||= FilterArray[
Filter::HtmlEntityFilter,
......@@ -41,3 +39,5 @@ module Banzai
end
end
end
Banzai::Pipeline::SingleLinePipeline.prepend_if_ee('EE::Banzai::Pipeline::SingleLinePipeline')
......@@ -4,8 +4,6 @@ module Banzai
module ReferenceParser
# The actual parser is implemented in the EE mixin
class EpicParser < IssuableParser
prepend_if_ee('::EE::Banzai::ReferenceParser::EpicParser') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reference_type = :epic
def records_for_nodes(_nodes)
......@@ -14,3 +12,5 @@ module Banzai
end
end
end
Banzai::ReferenceParser::EpicParser.prepend_if_ee('::EE::Banzai::ReferenceParser::EpicParser')
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