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
96df491e
Commit
96df491e
authored
May 11, 2020
by
Marius Bobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify variables serializers
Extract common elements from variables serializers into a new base class.
parent
b4ba3082
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
18 deletions
+4
-18
app/serializers/ci/basic_variable_entity.rb
app/serializers/ci/basic_variable_entity.rb
+1
-1
app/serializers/ci/instance_variable_serializer.rb
app/serializers/ci/instance_variable_serializer.rb
+1
-1
app/serializers/group_variable_entity.rb
app/serializers/group_variable_entity.rb
+1
-8
app/serializers/variable_entity.rb
app/serializers/variable_entity.rb
+1
-8
No files found.
app/serializers/ci/
instance
_variable_entity.rb
→
app/serializers/ci/
basic
_variable_entity.rb
View file @
96df491e
# frozen_string_literal: true
module
Ci
class
Instance
VariableEntity
<
Grape
::
Entity
class
Basic
VariableEntity
<
Grape
::
Entity
expose
:id
expose
:key
expose
:value
...
...
app/serializers/ci/instance_variable_serializer.rb
View file @
96df491e
...
...
@@ -2,6 +2,6 @@
module
Ci
class
InstanceVariableSerializer
<
BaseSerializer
entity
Instance
VariableEntity
entity
Basic
VariableEntity
end
end
app/serializers/group_variable_entity.rb
View file @
96df491e
# frozen_string_literal: true
class
GroupVariableEntity
<
Grape
::
Entity
expose
:id
expose
:key
expose
:value
expose
:variable_type
expose
:protected?
,
as: :protected
expose
:masked?
,
as: :masked
class
GroupVariableEntity
<
Ci
::
BasicVariableEntity
end
app/serializers/variable_entity.rb
View file @
96df491e
# frozen_string_literal: true
class
VariableEntity
<
Grape
::
Entity
expose
:id
expose
:key
expose
:value
expose
:variable_type
expose
:protected?
,
as: :protected
expose
:masked?
,
as: :masked
class
VariableEntity
<
Ci
::
BasicVariableEntity
expose
:environment_scope
end
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