Commit 891a16d6 authored by Allison Browne's avatar Allison Browne

Move PipelineEntity to the Ci namespace

PipelineEntity.rb -> Ci::PipelineEntity.rb
parent 2a03d152
......@@ -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])
......
......@@ -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
......
# frozen_string_literal: true
class PipelineEntity < Grape::Entity
class Ci::PipelineEntity < Grape::Entity
include RequestAwareEntity
include Gitlab::Utils::StrongMemoize
......
# frozen_string_literal: true
class PipelineDetailsEntity < PipelineEntity
class PipelineDetailsEntity < Ci::PipelineEntity
expose :project, using: ProjectEntity
expose :flags do
......
......@@ -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) }
......
......@@ -10,8 +10,8 @@ RSpec.describe PipelineDetailsEntity do
described_class.represent(pipeline, request: request)
end
it 'inherrits from PipelineEntity' do
expect(described_class).to be < PipelineEntity
it 'inherits from PipelineEntity' do
expect(described_class).to be < Ci::PipelineEntity
end
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment