Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
3bc0525a
Commit
3bc0525a
authored
Jan 18, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract compound statuses method in status factory
parent
e66b0414
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lib/gitlab/ci/status/factory.rb
lib/gitlab/ci/status/factory.rb
+7
-3
No files found.
lib/gitlab/ci/status/factory.rb
View file @
3bc0525a
...
@@ -12,9 +12,7 @@ module Gitlab
...
@@ -12,9 +12,7 @@ module Gitlab
if
extended_statuses
.
none?
if
extended_statuses
.
none?
core_status
core_status
else
else
extended_statuses
.
inject
(
core_status
)
do
|
status
,
extended
|
compound_extended_status
extended
.
new
(
status
)
end
end
end
end
end
...
@@ -25,6 +23,12 @@ module Gitlab
...
@@ -25,6 +23,12 @@ module Gitlab
.
extend
(
self
.
class
.
common_helpers
)
.
extend
(
self
.
class
.
common_helpers
)
end
end
def
compound_extended_status
extended_statuses
.
inject
(
core_status
)
do
|
status
,
extended
|
extended
.
new
(
status
)
end
end
def
extended_statuses
def
extended_statuses
return
@extended_statuses
if
defined?
(
@extended_statuses
)
return
@extended_statuses
if
defined?
(
@extended_statuses
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment