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
d40eaa58
Commit
d40eaa58
authored
Feb 13, 2020
by
Rajendra Kadam
Committed by
Stan Hu
Feb 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate page domain entities into own class files
parent
1e32c494
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
39 deletions
+59
-39
changelogs/unreleased/refactoring-entities-file-28.yml
changelogs/unreleased/refactoring-entities-file-28.yml
+5
-0
lib/api/entities.rb
lib/api/entities.rb
+0
-39
lib/api/entities/pages_domain.rb
lib/api/entities/pages_domain.rb
+20
-0
lib/api/entities/pages_domain_basic.rb
lib/api/entities/pages_domain_basic.rb
+22
-0
lib/api/entities/pages_domain_certificate.rb
lib/api/entities/pages_domain_certificate.rb
+12
-0
No files found.
changelogs/unreleased/refactoring-entities-file-28.yml
0 → 100644
View file @
d40eaa58
---
title
:
Separate page domain entities into own class files
merge_request
:
24987
author
:
Rajendra Kadam
type
:
added
lib/api/entities.rb
View file @
d40eaa58
...
...
@@ -744,45 +744,6 @@ module API
expose
:expiration
end
class
PagesDomainCertificate
<
Grape
::
Entity
expose
:subject
expose
:expired?
,
as: :expired
expose
:certificate
expose
:certificate_text
end
class
PagesDomainBasic
<
Grape
::
Entity
expose
:domain
expose
:url
expose
:project_id
expose
:verified?
,
as: :verified
expose
:verification_code
,
as: :verification_code
expose
:enabled_until
expose
:auto_ssl_enabled
expose
:certificate
,
as: :certificate_expiration
,
if:
->
(
pages_domain
,
_
)
{
pages_domain
.
certificate?
},
using:
PagesDomainCertificateExpiration
do
|
pages_domain
|
pages_domain
end
end
class
PagesDomain
<
Grape
::
Entity
expose
:domain
expose
:url
expose
:verified?
,
as: :verified
expose
:verification_code
,
as: :verification_code
expose
:enabled_until
expose
:auto_ssl_enabled
expose
:certificate
,
if:
->
(
pages_domain
,
_
)
{
pages_domain
.
certificate?
},
using:
PagesDomainCertificate
do
|
pages_domain
|
pages_domain
end
end
class
Application
<
Grape
::
Entity
expose
:id
expose
:uid
,
as: :application_id
...
...
lib/api/entities/pages_domain.rb
0 → 100644
View file @
d40eaa58
# frozen_string_literal: true
module
API
module
Entities
class
PagesDomain
<
Grape
::
Entity
expose
:domain
expose
:url
expose
:verified?
,
as: :verified
expose
:verification_code
,
as: :verification_code
expose
:enabled_until
expose
:auto_ssl_enabled
expose
:certificate
,
if:
->
(
pages_domain
,
_
)
{
pages_domain
.
certificate?
},
using:
Entities
::
PagesDomainCertificate
do
|
pages_domain
|
pages_domain
end
end
end
end
lib/api/entities/pages_domain_basic.rb
0 → 100644
View file @
d40eaa58
# frozen_string_literal: true
module
API
module
Entities
class
PagesDomainBasic
<
Grape
::
Entity
expose
:domain
expose
:url
expose
:project_id
expose
:verified?
,
as: :verified
expose
:verification_code
,
as: :verification_code
expose
:enabled_until
expose
:auto_ssl_enabled
expose
:certificate
,
as: :certificate_expiration
,
if:
->
(
pages_domain
,
_
)
{
pages_domain
.
certificate?
},
using:
Entities
::
PagesDomainCertificateExpiration
do
|
pages_domain
|
pages_domain
end
end
end
end
lib/api/entities/pages_domain_certificate.rb
0 → 100644
View file @
d40eaa58
# frozen_string_literal: true
module
API
module
Entities
class
PagesDomainCertificate
<
Grape
::
Entity
expose
:subject
expose
:expired?
,
as: :expired
expose
:certificate
expose
:certificate_text
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