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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
891a16d6
Commit
891a16d6
authored
Jan 25, 2021
by
Allison Browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move PipelineEntity to the Ci namespace
PipelineEntity.rb -> Ci::PipelineEntity.rb
parent
2a03d152
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
app/serializers/README.md
app/serializers/README.md
+1
-1
app/serializers/build_details_entity.rb
app/serializers/build_details_entity.rb
+1
-1
app/serializers/ci/pipeline_entity.rb
app/serializers/ci/pipeline_entity.rb
+1
-1
app/serializers/pipeline_details_entity.rb
app/serializers/pipeline_details_entity.rb
+1
-1
spec/serializers/ci/pipeline_entity_spec.rb
spec/serializers/ci/pipeline_entity_spec.rb
+1
-1
spec/serializers/pipeline_details_entity_spec.rb
spec/serializers/pipeline_details_entity_spec.rb
+2
-2
No files found.
app/serializers/README.md
View file @
891a16d6
...
...
@@ -99,7 +99,7 @@ create a JSON response according to your needs.
```
ruby
class
PipelineSerializer
<
BaseSerializer
entity
PipelineEntity
entity
Ci
::
PipelineEntity
def
represent_details
(
resource
)
represent
(
resource
,
only:
[
:details
])
...
...
app/serializers/build_details_entity.rb
View file @
891a16d6
...
...
@@ -9,7 +9,7 @@ class BuildDetailsEntity < JobEntity
expose
:user
,
using:
UserEntity
expose
:runner
,
using:
RunnerEntity
expose
:metadata
,
using:
BuildMetadataEntity
expose
:pipeline
,
using:
PipelineEntity
expose
:pipeline
,
using:
Ci
::
PipelineEntity
expose
:deployment_status
,
if:
->
(
*
)
{
build
.
starts_environment?
}
do
expose
:deployment_status
,
as: :status
...
...
app/serializers/pipeline_entity.rb
→
app/serializers/
ci/
pipeline_entity.rb
View file @
891a16d6
# frozen_string_literal: true
class
PipelineEntity
<
Grape
::
Entity
class
Ci::
PipelineEntity
<
Grape
::
Entity
include
RequestAwareEntity
include
Gitlab
::
Utils
::
StrongMemoize
...
...
app/serializers/pipeline_details_entity.rb
View file @
891a16d6
# frozen_string_literal: true
class
PipelineDetailsEntity
<
PipelineEntity
class
PipelineDetailsEntity
<
Ci
::
PipelineEntity
expose
:project
,
using:
ProjectEntity
expose
:flags
do
...
...
spec/serializers/pipeline_entity_spec.rb
→
spec/serializers/
ci/
pipeline_entity_spec.rb
View file @
891a16d6
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
PipelineEntity
do
RSpec
.
describe
Ci
::
PipelineEntity
do
include
Gitlab
::
Routing
let_it_be
(
:project
)
{
create
(
:project
)
}
...
...
spec/serializers/pipeline_details_entity_spec.rb
View file @
891a16d6
...
...
@@ -10,8 +10,8 @@ RSpec.describe PipelineDetailsEntity do
described_class
.
represent
(
pipeline
,
request:
request
)
end
it
'inher
r
its from PipelineEntity'
do
expect
(
described_class
).
to
be
<
PipelineEntity
it
'inherits from PipelineEntity'
do
expect
(
described_class
).
to
be
<
Ci
::
PipelineEntity
end
before
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