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
d4ed5b2e
Commit
d4ed5b2e
authored
Dec 02, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add abstract base class for core CI status
parent
5df3e8b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletion
+44
-1
lib/gitlab/ci/status/core/base.rb
lib/gitlab/ci/status/core/base.rb
+41
-0
lib/gitlab/ci/status/core/success.rb
lib/gitlab/ci/status/core/success.rb
+1
-1
spec/lib/gitlab/ci/status/core/success_spec.rb
spec/lib/gitlab/ci/status/core/success_spec.rb
+2
-0
No files found.
lib/gitlab/ci/status/core/base.rb
0 → 100644
View file @
d4ed5b2e
module
Gitlab::Ci
module
Status
module
Core
# Base abstract class fore core status
#
class
Base
def
initialize
(
subject
)
@subject
=
subject
end
def
icon
raise
NotImplementedError
end
def
label
raise
NotImplementedError
end
def
has_details?
raise
NotImplementedError
end
def
details_path
raise
NotImplementedError
end
def
has_action?
raise
NotImplementedError
end
def
action_icon
raise
NotImplementedError
end
def
action_path
raise
NotImplementedError
end
end
end
end
end
lib/gitlab/ci/status/core/success.rb
View file @
d4ed5b2e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Success
class
Success
<
Core
::
Base
def
label
def
label
'passed'
'passed'
end
end
...
...
spec/lib/gitlab/ci/status/core/success_spec.rb
View file @
d4ed5b2e
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Success
do
describe
Gitlab
::
Ci
::
Status
::
Core
::
Success
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'passed'
}
it
{
expect
(
subject
.
label
).
to
eq
'passed'
}
end
end
...
...
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