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
Jérome Perrin
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
Hide 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
Status
module
Ci
module
Core
module
Status
class
Canceled
<
Core
::
Bas
e
class
Canceled
<
Status
::
Cor
e
def
text
def
text
'canceled'
'canceled'
end
end
...
...
lib/gitlab/ci/status/core
/base
.rb
→
lib/gitlab/ci/status/core.rb
View file @
b86d8afe
module
Gitlab
::Ci
module
Gitlab
module
Status
module
Ci
module
Core
module
Status
# Base abstract class fore core status
# Base abstract class fore core status
#
#
class
Bas
e
class
Cor
e
include
Gitlab
::
Routing
.
url_helpers
include
Gitlab
::
Routing
.
url_helpers
def
initialize
(
subject
)
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
Status
module
Ci
module
Core
module
Status
class
Created
<
Core
::
Bas
e
class
Created
<
Status
::
Cor
e
def
text
def
text
'created'
'created'
end
end
...
...
lib/gitlab/ci/status/extended
/base
.rb
→
lib/gitlab/ci/status/extended.rb
View file @
b86d8afe
module
Gitlab
::Ci
module
Gitlab
module
Status
module
Ci
module
Extended
module
Status
module
Base
module
Extended
def
matches?
(
_subject
)
def
matches?
(
_subject
)
raise
NotImplementedError
raise
NotImplementedError
end
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
Status
module
Ci
module
Core
module
Status
class
Failed
<
Core
::
Bas
e
class
Failed
<
Status
::
Cor
e
def
text
def
text
'failed'
'failed'
end
end
...
...
lib/gitlab/ci/status/
core/
pending.rb
→
lib/gitlab/ci/status/pending.rb
View file @
b86d8afe
module
Gitlab
::Ci
module
Gitlab
module
Status
module
Ci
module
Core
module
Status
class
Pending
<
Core
::
Bas
e
class
Pending
<
Status
::
Cor
e
def
text
def
text
'pending'
'pending'
end
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
Status
module
Ci
module
Extended
module
Status
module
Pipeline
module
Pipeline
module
Common
module
Common
def
has_details?
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
Status
module
Ci
module
Extended
module
Status
module
Pipeline
module
Pipeline
class
SuccessWithWarnings
<
SimpleDelegator
class
SuccessWithWarnings
<
SimpleDelegator
extend
Status
::
Extended
::
Base
extend
Status
::
Extended
def
text
def
text
'passed'
'passed'
...
...
lib/gitlab/ci/status/
core/
running.rb
→
lib/gitlab/ci/status/running.rb
View file @
b86d8afe
module
Gitlab
::Ci
module
Gitlab
module
Status
module
Ci
module
Core
module
Status
class
Running
<
Core
::
Bas
e
class
Running
<
Status
::
Cor
e
def
text
def
text
'running'
'running'
end
end
...
...
lib/gitlab/ci/status/
core/
skipped.rb
→
lib/gitlab/ci/status/skipped.rb
View file @
b86d8afe
module
Gitlab
::Ci
module
Gitlab
module
Status
module
Ci
module
Core
module
Status
class
Skipped
<
Core
::
Bas
e
class
Skipped
<
Status
::
Cor
e
def
text
def
text
'skipped'
'skipped'
end
end
...
...
lib/gitlab/ci/status/
core/
success.rb
→
lib/gitlab/ci/status/success.rb
View file @
b86d8afe
module
Gitlab
::Ci
module
Gitlab
module
Status
module
Ci
module
Core
module
Status
class
Success
<
Core
::
Bas
e
class
Success
<
Status
::
Cor
e
def
text
def
text
'passed'
'passed'
end
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
C
ore
::
C
anceled
do
describe
Gitlab
::
Ci
::
Status
::
Canceled
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
C
ore
::
C
reated
do
describe
Gitlab
::
Ci
::
Status
::
Created
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Extended
::
Base
do
describe
Gitlab
::
Ci
::
Status
::
Extended
do
subject
do
subject
do
Class
.
new
.
extend
(
described_class
)
Class
.
new
.
extend
(
described_class
)
end
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Failed
do
describe
Gitlab
::
Ci
::
Status
::
Failed
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Pending
do
describe
Gitlab
::
Ci
::
Status
::
Pending
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Extended
::
Pipeline
::
Common
do
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
Common
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
)
}
subject
do
subject
do
Gitlab
::
Ci
::
Status
::
Core
::
Success
Class
.
new
(
Gitlab
::
Ci
::
Status
::
Core
)
.
new
(
pipeline
).
extend
(
described_class
)
.
new
(
pipeline
).
extend
(
described_class
)
end
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Extended
::
Pipeline
::
SuccessWithWarnings
do
describe
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
do
subject
do
subject
do
described_class
.
new
(
double
(
'status'
))
described_class
.
new
(
double
(
'status'
))
end
end
...
...
spec/lib/gitlab/ci/status/
core/
running_spec.rb
→
spec/lib/gitlab/ci/status/running_spec.rb
View file @
b86d8afe
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Running
do
describe
Gitlab
::
Ci
::
Status
::
Running
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Skipped
do
describe
Gitlab
::
Ci
::
Status
::
Skipped
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Success
do
describe
Gitlab
::
Ci
::
Status
::
Success
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#text'
do
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