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
e31ff0ef
Commit
e31ff0ef
authored
Nov 29, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add registry entity and specs
parent
5a493883
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
app/serializers/project_registry_entity.rb
app/serializers/project_registry_entity.rb
+13
-0
app/serializers/project_registry_serializer.rb
app/serializers/project_registry_serializer.rb
+3
-0
spec/serializers/project_registry_entity_spec.rb
spec/serializers/project_registry_entity_spec.rb
+21
-0
No files found.
app/serializers/project_registry_entity.rb
0 → 100644
View file @
e31ff0ef
class
ProjectRegistryEntity
<
Grape
::
Entity
include
ActionView
::
Helpers
::
NumberHelper
expose
:project_id
expose
:last_repository_synced_at
expose
:last_repository_successful_sync_at
expose
:last_wiki_synced_at
expose
:last_wiki_successful_sync_at
expose
:repository_retry_count
expose
:wiki_retry_count
expose
:last_repository_sync_failure
expose
:last_wiki_sync_failure
end
app/serializers/project_registry_serializer.rb
0 → 100644
View file @
e31ff0ef
class
ProjectRegistrySerializer
<
BaseSerializer
entity
ProjectRegistryEntity
end
spec/serializers/project_registry_entity_spec.rb
0 → 100644
View file @
e31ff0ef
require
'spec_helper'
describe
ProjectRegistryEntity
,
:postgresql
do
let
(
:registry
)
{
create
(
:geo_project_registry
,
:synced
)
}
let
(
:entity
)
do
described_class
.
new
(
registry
,
request:
double
)
end
subject
{
entity
.
as_json
}
it
{
is_expected
.
to
have_key
(
:project_id
)
}
it
{
is_expected
.
to
have_key
(
:last_repository_synced_at
)
}
it
{
is_expected
.
to
have_key
(
:last_repository_successful_sync_at
)
}
it
{
is_expected
.
to
have_key
(
:last_wiki_synced_at
)
}
it
{
is_expected
.
to
have_key
(
:last_wiki_successful_sync_at
)
}
it
{
is_expected
.
to
have_key
(
:repository_retry_count
)
}
it
{
is_expected
.
to
have_key
(
:wiki_retry_count
)
}
it
{
is_expected
.
to
have_key
(
:last_repository_sync_failure
)
}
it
{
is_expected
.
to
have_key
(
:last_wiki_sync_failure
)
}
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