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
b86d8afe
Commit
b86d8afe
authored
Dec 05, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fold core/extended status modules to reduce nesting
parent
d55ff247
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
54 additions
and
60 deletions
+54
-60
lib/gitlab/ci/status/canceled.rb
lib/gitlab/ci/status/canceled.rb
+4
-4
lib/gitlab/ci/status/core.rb
lib/gitlab/ci/status/core.rb
+4
-4
lib/gitlab/ci/status/created.rb
lib/gitlab/ci/status/created.rb
+4
-4
lib/gitlab/ci/status/extended.rb
lib/gitlab/ci/status/extended.rb
+4
-4
lib/gitlab/ci/status/factory.rb
lib/gitlab/ci/status/factory.rb
+0
-6
lib/gitlab/ci/status/failed.rb
lib/gitlab/ci/status/failed.rb
+4
-4
lib/gitlab/ci/status/pending.rb
lib/gitlab/ci/status/pending.rb
+4
-4
lib/gitlab/ci/status/pipeline/common.rb
lib/gitlab/ci/status/pipeline/common.rb
+3
-3
lib/gitlab/ci/status/pipeline/success_with_warnings.rb
lib/gitlab/ci/status/pipeline/success_with_warnings.rb
+4
-4
lib/gitlab/ci/status/running.rb
lib/gitlab/ci/status/running.rb
+4
-4
lib/gitlab/ci/status/skipped.rb
lib/gitlab/ci/status/skipped.rb
+4
-4
lib/gitlab/ci/status/success.rb
lib/gitlab/ci/status/success.rb
+4
-4
spec/lib/gitlab/ci/status/canceled_spec.rb
spec/lib/gitlab/ci/status/canceled_spec.rb
+1
-1
spec/lib/gitlab/ci/status/created_spec.rb
spec/lib/gitlab/ci/status/created_spec.rb
+1
-1
spec/lib/gitlab/ci/status/extended_spec.rb
spec/lib/gitlab/ci/status/extended_spec.rb
+1
-1
spec/lib/gitlab/ci/status/factory_spec.rb
spec/lib/gitlab/ci/status/factory_spec.rb
+0
-0
spec/lib/gitlab/ci/status/failed_spec.rb
spec/lib/gitlab/ci/status/failed_spec.rb
+1
-1
spec/lib/gitlab/ci/status/pending_spec.rb
spec/lib/gitlab/ci/status/pending_spec.rb
+1
-1
spec/lib/gitlab/ci/status/pipeline/common_spec.rb
spec/lib/gitlab/ci/status/pipeline/common_spec.rb
+2
-2
spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb
...b/gitlab/ci/status/pipeline/success_with_warnings_spec.rb
+1
-1
spec/lib/gitlab/ci/status/running_spec.rb
spec/lib/gitlab/ci/status/running_spec.rb
+1
-1
spec/lib/gitlab/ci/status/skipped_spec.rb
spec/lib/gitlab/ci/status/skipped_spec.rb
+1
-1
spec/lib/gitlab/ci/status/success_spec.rb
spec/lib/gitlab/ci/status/success_spec.rb
+1
-1
No files found.
lib/gitlab/ci/status/c
ore/c
anceled.rb
→
lib/gitlab/ci/status/canceled.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Canceled
<
Core
::
Base
class
Canceled
<
Status
::
Core
def
text
'canceled'
end
...
...
lib/gitlab/ci/status/core
/base
.rb
→
lib/gitlab/ci/status/core.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
# Base abstract class fore core status
#
class
Bas
e
class
Cor
e
include
Gitlab
::
Routing
.
url_helpers
def
initialize
(
subject
)
...
...
lib/gitlab/ci/status/c
ore/c
reated.rb
→
lib/gitlab/ci/status/created.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Created
<
Core
::
Base
class
Created
<
Status
::
Core
def
text
'created'
end
...
...
lib/gitlab/ci/status/extended
/base
.rb
→
lib/gitlab/ci/status/extended.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Extended
module
Base
def
matches?
(
_subject
)
raise
NotImplementedError
end
...
...
lib/gitlab/ci/status/factory.rb
deleted
100644 → 0
View file @
d55ff247
module
Gitlab::Ci
module
Status
class
Factory
end
end
end
lib/gitlab/ci/status/
core/
failed.rb
→
lib/gitlab/ci/status/failed.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Failed
<
Core
::
Base
class
Failed
<
Status
::
Core
def
text
'failed'
end
...
...
lib/gitlab/ci/status/
core/
pending.rb
→
lib/gitlab/ci/status/pending.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Pending
<
Core
::
Base
class
Pending
<
Status
::
Core
def
text
'pending'
end
...
...
lib/gitlab/ci/status/
extended/
pipeline/common.rb
→
lib/gitlab/ci/status/pipeline/common.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Extended
module
Pipeline
module
Common
def
has_details?
...
...
lib/gitlab/ci/status/
extended/
pipeline/success_with_warnings.rb
→
lib/gitlab/ci/status/pipeline/success_with_warnings.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Extended
module
Pipeline
class
SuccessWithWarnings
<
SimpleDelegator
extend
Status
::
Extended
::
Base
extend
Status
::
Extended
def
text
'passed'
...
...
lib/gitlab/ci/status/
core/
running.rb
→
lib/gitlab/ci/status/running.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Running
<
Core
::
Base
class
Running
<
Status
::
Core
def
text
'running'
end
...
...
lib/gitlab/ci/status/
core/
skipped.rb
→
lib/gitlab/ci/status/skipped.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Skipped
<
Core
::
Base
class
Skipped
<
Status
::
Core
def
text
'skipped'
end
...
...
lib/gitlab/ci/status/
core/
success.rb
→
lib/gitlab/ci/status/success.rb
View file @
b86d8afe
module
Gitlab::Ci
module
Gitlab
module
Ci
module
Status
module
Core
class
Success
<
Core
::
Base
class
Success
<
Status
::
Core
def
text
'passed'
end
...
...
spec/lib/gitlab/ci/status/c
ore/c
anceled_spec.rb
→
spec/lib/gitlab/ci/status/canceled_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
C
ore
::
C
anceled
do
describe
Gitlab
::
Ci
::
Status
::
Canceled
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
spec/lib/gitlab/ci/status/c
ore/c
reated_spec.rb
→
spec/lib/gitlab/ci/status/created_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
C
ore
::
C
reated
do
describe
Gitlab
::
Ci
::
Status
::
Created
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
spec/lib/gitlab/ci/status/extended
/base
_spec.rb
→
spec/lib/gitlab/ci/status/extended_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Extended
::
Base
do
describe
Gitlab
::
Ci
::
Status
::
Extended
do
subject
do
Class
.
new
.
extend
(
described_class
)
end
...
...
spec/lib/gitlab/ci/status/factory_spec.rb
deleted
100644 → 0
View file @
d55ff247
spec/lib/gitlab/ci/status/
core/
failed_spec.rb
→
spec/lib/gitlab/ci/status/failed_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Failed
do
describe
Gitlab
::
Ci
::
Status
::
Failed
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
spec/lib/gitlab/ci/status/
core/
pending_spec.rb
→
spec/lib/gitlab/ci/status/pending_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Pending
do
describe
Gitlab
::
Ci
::
Status
::
Pending
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
spec/lib/gitlab/ci/status/
extended/
pipeline/common_spec.rb
→
spec/lib/gitlab/ci/status/pipeline/common_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Extended
::
Pipeline
::
Common
do
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Common
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
subject
do
Gitlab
::
Ci
::
Status
::
Core
::
Success
Class
.
new
(
Gitlab
::
Ci
::
Status
::
Core
)
.
new
(
pipeline
).
extend
(
described_class
)
end
...
...
spec/lib/gitlab/ci/status/
extended/
pipeline/success_with_warnings_spec.rb
→
spec/lib/gitlab/ci/status/pipeline/success_with_warnings_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Extended
::
Pipeline
::
SuccessWithWarnings
do
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
do
subject
do
described_class
.
new
(
double
(
'status'
))
end
...
...
spec/lib/gitlab/ci/status/
core/
running_spec.rb
→
spec/lib/gitlab/ci/status/running_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Running
do
describe
Gitlab
::
Ci
::
Status
::
Running
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
spec/lib/gitlab/ci/status/
core/
skipped_spec.rb
→
spec/lib/gitlab/ci/status/skipped_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Skipped
do
describe
Gitlab
::
Ci
::
Status
::
Skipped
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
spec/lib/gitlab/ci/status/
core/
success_spec.rb
→
spec/lib/gitlab/ci/status/success_spec.rb
View file @
b86d8afe
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Success
do
describe
Gitlab
::
Ci
::
Status
::
Success
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
...
...
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