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
Tatuya Kamada
gitlab-ce
Commits
6296a1cc
Commit
6296a1cc
authored
Dec 08, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix auto loading of constants for Ci Statuses
parent
c1db5b91
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
20 deletions
+21
-20
app/models/ci/build.rb
app/models/ci/build.rb
+3
-3
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+2
-2
app/models/ci/stage.rb
app/models/ci/stage.rb
+2
-2
app/models/commit_status.rb
app/models/commit_status.rb
+2
-2
app/views/ci/status/_icon_with_label.html.haml
app/views/ci/status/_icon_with_label.html.haml
+7
-6
lib/gitlab/ci/status/build/cancelable.rb
lib/gitlab/ci/status/build/cancelable.rb
+1
-1
lib/gitlab/ci/status/build/play.rb
lib/gitlab/ci/status/build/play.rb
+1
-1
lib/gitlab/ci/status/build/retryable.rb
lib/gitlab/ci/status/build/retryable.rb
+1
-1
lib/gitlab/ci/status/build/stop.rb
lib/gitlab/ci/status/build/stop.rb
+2
-2
No files found.
app/models/ci/build.rb
View file @
6296a1cc
...
@@ -100,8 +100,8 @@ module Ci
...
@@ -100,8 +100,8 @@ module Ci
end
end
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Build
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Build
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
def
manual?
def
manual?
...
@@ -156,7 +156,7 @@ module Ci
...
@@ -156,7 +156,7 @@ module Ci
end
end
def
environment_action
def
environment_action
self
.
options
.
fetch
(
:environment
,
{}).
fetch
(
:action
,
'start'
)
self
.
options
.
fetch
(
:environment
,
{}).
fetch
(
:action
,
'start'
)
if
self
.
options
end
end
def
outdated_deployment?
def
outdated_deployment?
...
...
app/models/ci/pipeline.rb
View file @
6296a1cc
...
@@ -336,8 +336,8 @@ module Ci
...
@@ -336,8 +336,8 @@ module Ci
.
select
{
|
merge_request
|
merge_request
.
head_pipeline
.
try
(
:id
)
==
self
.
id
}
.
select
{
|
merge_request
|
merge_request
.
head_pipeline
.
try
(
:id
)
==
self
.
id
}
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Pipeline
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Pipeline
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
private
private
...
...
app/models/ci/stage.rb
View file @
6296a1cc
...
@@ -22,8 +22,8 @@ module Ci
...
@@ -22,8 +22,8 @@ module Ci
@status
||=
statuses
.
latest
.
status
@status
||=
statuses
.
latest
.
status
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Stage
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Stage
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
def
statuses
def
statuses
...
...
app/models/commit_status.rb
View file @
6296a1cc
...
@@ -132,7 +132,7 @@ class CommitStatus < ActiveRecord::Base
...
@@ -132,7 +132,7 @@ class CommitStatus < ActiveRecord::Base
false
false
end
end
def
detailed_status
def
detailed_status
(
current_user
)
Gitlab
::
Ci
::
Status
::
Factory
.
new
(
self
).
fabricate!
Gitlab
::
Ci
::
Status
::
Factory
.
new
(
self
,
current_user
).
fabricate!
end
end
end
end
app/views/ci/status/_icon_with_label.html.haml
View file @
6296a1cc
-
details_path
=
subject
.
details_path
if
subject
.
has_details?
(
current_user
)
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
klass
=
"ci-status ci-
#{
subject
.
status
}
"
-
details_path
=
detailed_status
.
details_path
if
detailed_status
.
has_details?
-
klass
=
"ci-status ci-
#{
detailed_status
}
"
-
if
details_path
-
if
details_path
=
link_to
details_path
,
class:
klass
do
=
link_to
details_path
,
class:
klass
do
=
custom_icon
(
status
.
icon
)
=
custom_icon
(
detailed_
status
.
icon
)
=
status
.
text
=
detailed_
status
.
text
-
else
-
else
%span
{
class:
klass
}
%span
{
class:
klass
}
=
custom_icon
(
status
.
icon
)
=
custom_icon
(
detailed_
status
.
icon
)
=
status
.
text
=
detailed_
status
.
text
lib/gitlab/ci/status/build/cancelable.rb
View file @
6296a1cc
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Cancelable
<
SimpleDelegator
class
Cancelable
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
...
...
lib/gitlab/ci/status/build/play.rb
View file @
6296a1cc
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Play
<
SimpleDelegator
class
Play
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
...
...
lib/gitlab/ci/status/build/retryable.rb
View file @
6296a1cc
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Retryable
<
SimpleDelegator
class
Retryable
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
...
...
lib/gitlab/ci/status/build/stop.rb
View file @
6296a1cc
module
Gitlab
module
Gitlab
module
Ci
module
Ci
module
Status
module
Status
module
Status
module
Build
class
Play
<
SimpleDelegator
class
Stop
<
SimpleDelegator
include
Status
::
Extended
include
Status
::
Extended
def
text
def
text
...
...
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