diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-08 12:29:48 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-08 12:29:48 +0100 |
commit | 13f44822d97e643b55047cf619f7bb1f354f165b (patch) | |
tree | 0393150758cdf3a9e7c560caae1163257ba13c1c | |
parent | 611912fe6870cac43fef9eea389f1229945f186a (diff) | |
download | gitlab-ce-13f44822d97e643b55047cf619f7bb1f354f165b.tar.gz |
Move CombinedPipeline methods around
-rw-r--r-- | lib/gitlab/markdown/combined_pipeline.rb | 12 | ||||
-rw-r--r-- | lib/gitlab/markdown/pipeline/full_pipeline.rb | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/gitlab/markdown/combined_pipeline.rb b/lib/gitlab/markdown/combined_pipeline.rb index a3d717550f5..6b08a5e9f72 100644 --- a/lib/gitlab/markdown/combined_pipeline.rb +++ b/lib/gitlab/markdown/combined_pipeline.rb @@ -7,16 +7,18 @@ module Gitlab Class.new(Pipeline) do const_set :PIPELINES, pipelines + def self.pipelines + self::PIPELINES + end + def self.filters pipelines.flat_map(&:filters) end def self.transform_context(context) - pipelines.reduce(context) { |context, pipeline| pipeline.transform_context(context) } - end - - def self.pipelines - self::PIPELINES + pipelines.reduce(context) do |context, pipeline| + pipeline.transform_context(context) + end end end end diff --git a/lib/gitlab/markdown/pipeline/full_pipeline.rb b/lib/gitlab/markdown/pipeline/full_pipeline.rb index 553e9367c1c..b3b7a3c27c0 100644 --- a/lib/gitlab/markdown/pipeline/full_pipeline.rb +++ b/lib/gitlab/markdown/pipeline/full_pipeline.rb @@ -3,7 +3,7 @@ require 'gitlab/markdown' module Gitlab module Markdown class FullPipeline < CombinedPipeline.new(PlainMarkdownPipeline, GfmPipeline) - + end end end |