summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-08-23 17:28:23 +0000
committerDouwe Maan <douwe@gitlab.com>2016-08-23 17:28:23 +0000
commita20bbc310db64bb922d63cb529b666f2db8cc555 (patch)
tree243661ab303418ba582d896809ccc91177662b97
parentf2b36bfd147c63090c99145fa181a9ab83aa596f (diff)
parent542be288d6bf4fbef958281e08bfded773c47561 (diff)
downloadgitlab-ce-a20bbc310db64bb922d63cb529b666f2db8cc555.tar.gz
Merge branch 'environment-entity-inherit' into 'master'
entities: make Environment inherit EnvironmentBasic ## What does this MR do? Makes the `Environment` entity inherit from `EnvironmentBasic` ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? Just a code simplification. ## What are the relevant issue numbers? N/A ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5959
-rw-r--r--lib/api/entities.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 54ce2dcfa57..66b85ab1793 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -514,13 +514,12 @@ module API
expose :duration
end
- class Environment < Grape::Entity
+ class EnvironmentBasic < Grape::Entity
expose :id, :name, :external_url
- expose :project, using: Entities::Project
end
- class EnvironmentBasic < Grape::Entity
- expose :id, :name, :external_url
+ class Environment < EnvironmentBasic
+ expose :project, using: Entities::Project
end
class Deployment < Grape::Entity