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
64d98dd5
Commit
64d98dd5
authored
Feb 14, 2020
by
Rajendra Kadam
Committed by
James Lopez
Feb 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate user agent, custom attribute and page domain cert into own entities file
parent
b1fe7c90
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
16 deletions
+36
-16
changelogs/unreleased/refactoring-entities-file-27.yml
changelogs/unreleased/refactoring-entities-file-27.yml
+5
-0
lib/api/entities.rb
lib/api/entities.rb
+0
-16
lib/api/entities/custom_attribute.rb
lib/api/entities/custom_attribute.rb
+10
-0
lib/api/entities/pages_domain_certificate_expiration.rb
lib/api/entities/pages_domain_certificate_expiration.rb
+10
-0
lib/api/entities/user_agent_detail.rb
lib/api/entities/user_agent_detail.rb
+11
-0
No files found.
changelogs/unreleased/refactoring-entities-file-27.yml
0 → 100644
View file @
64d98dd5
---
title
:
Separate entities into own class files
merge_request
:
24985
author
:
Rajendra Kadam
type
:
added
lib/api/entities.rb
View file @
64d98dd5
...
...
@@ -199,22 +199,6 @@ module API
end
.
compact
end
end
class
UserAgentDetail
<
Grape
::
Entity
expose
:user_agent
expose
:ip_address
expose
:submitted
,
as: :akismet_submitted
end
class
CustomAttribute
<
Grape
::
Entity
expose
:key
expose
:value
end
class
PagesDomainCertificateExpiration
<
Grape
::
Entity
expose
:expired?
,
as: :expired
expose
:expiration
end
end
end
...
...
lib/api/entities/custom_attribute.rb
0 → 100644
View file @
64d98dd5
# frozen_string_literal: true
module
API
module
Entities
class
CustomAttribute
<
Grape
::
Entity
expose
:key
expose
:value
end
end
end
lib/api/entities/pages_domain_certificate_expiration.rb
0 → 100644
View file @
64d98dd5
# frozen_string_literal: true
module
API
module
Entities
class
PagesDomainCertificateExpiration
<
Grape
::
Entity
expose
:expired?
,
as: :expired
expose
:expiration
end
end
end
lib/api/entities/user_agent_detail.rb
0 → 100644
View file @
64d98dd5
# frozen_string_literal: true
module
API
module
Entities
class
UserAgentDetail
<
Grape
::
Entity
expose
:user_agent
expose
:ip_address
expose
:submitted
,
as: :akismet_submitted
end
end
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