summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-18 11:30:28 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-18 11:30:28 +0100
commit3bc0525ad90aa84ff864a0bc9c43e18ec5d5cd3d (patch)
tree36e3cc3e3c2dfce0d3271f129c2bf396c6c31576
parente66b0414cb0a81565937391252e841c777bf270b (diff)
downloadgitlab-ce-3bc0525ad90aa84ff864a0bc9c43e18ec5d5cd3d.tar.gz
Extract compound statuses method in status factory
-rw-r--r--lib/gitlab/ci/status/factory.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/gitlab/ci/status/factory.rb b/lib/gitlab/ci/status/factory.rb
index 3da5ae4fc01..4d7c71ed469 100644
--- a/lib/gitlab/ci/status/factory.rb
+++ b/lib/gitlab/ci/status/factory.rb
@@ -12,9 +12,7 @@ module Gitlab
if extended_statuses.none?
core_status
else
- extended_statuses.inject(core_status) do |status, extended|
- extended.new(status)
- end
+ compound_extended_status
end
end
@@ -25,6 +23,12 @@ module Gitlab
.extend(self.class.common_helpers)
end
+ def compound_extended_status
+ extended_statuses.inject(core_status) do |status, extended|
+ extended.new(status)
+ end
+ end
+
def extended_statuses
return @extended_statuses if defined?(@extended_statuses)