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
af80fcb4
Commit
af80fcb4
authored
Nov 17, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
ed39d61d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
lib/gitlab/cycle_analytics/base_event.rb
lib/gitlab/cycle_analytics/base_event.rb
+2
-2
lib/gitlab/cycle_analytics/issue_event.rb
lib/gitlab/cycle_analytics/issue_event.rb
+1
-1
lib/gitlab/cycle_analytics/plan_event.rb
lib/gitlab/cycle_analytics/plan_event.rb
+1
-1
lib/gitlab/cycle_analytics/review_event.rb
lib/gitlab/cycle_analytics/review_event.rb
+1
-1
spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
+5
-5
No files found.
lib/gitlab/cycle_analytics/base_event.rb
View file @
af80fcb4
...
...
@@ -10,7 +10,7 @@ module Gitlab
@order
||
@start_time_attrs
end
def
query
(
base_query
);
end
def
query
(
_
base_query
);
end
def
fetch
(
query
)
query
.
execute
(
self
).
map
{
|
event
|
serialize
(
event
,
query
)
}
...
...
@@ -18,7 +18,7 @@ module Gitlab
private
def
serialize
(
event
,
query
)
def
serialize
(
_event
,
_
query
)
raise
NotImplementedError
.
new
(
"Expected
#{
self
.
name
}
to implement serialize(event)"
)
end
end
...
...
lib/gitlab/cycle_analytics/issue_event.rb
View file @
af80fcb4
...
...
@@ -13,7 +13,7 @@ module Gitlab
issue_table
[
:created_at
],
issue_table
[
:author_id
]]
def
self
.
serialize
(
event
,
query
)
def
self
.
serialize
(
event
,
query
)
#
event
[
'author'
]
=
User
.
find
(
event
.
delete
(
'author_id'
))
AnalyticsIssueSerializer
.
new
(
project:
query
.
project
).
represent
(
event
).
as_json
...
...
lib/gitlab/cycle_analytics/plan_event.rb
View file @
af80fcb4
lib/gitlab/cycle_analytics/review_event.rb
View file @
af80fcb4
...
...
@@ -11,7 +11,7 @@ module Gitlab
mr_table
[
:state
],
mr_table
[
:author_id
]]
def
self
.
serialize
(
event
,
_
query
)
def
self
.
serialize
(
event
,
query
)
event
[
'author'
]
=
User
.
find
(
event
.
delete
(
'author_id'
))
AnalyticsMergeRequestSerializer
.
new
(
project:
query
.
project
).
represent
(
event
).
as_json
...
...
spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
View file @
af80fcb4
...
...
@@ -5,15 +5,15 @@ shared_examples 'default query config' do
expect
(
described_class
.
start_time_attrs
).
not_to
be_nil
end
it
'has the stage attribute'
do
expect
(
described_class
.
stage
).
not_to
be_nil
end
it
'has the end attributes'
do
expect
(
described_class
.
end_time_attrs
).
not_to
be_nil
expect
(
described_class
.
end_time_attrs
).
not_to
be_nil
end
it
'has the projection attributes'
do
expect
(
described_class
.
projections
).
not_to
be_nil
end
it
'implements the fetch method'
do
expect
(
described_class
.
fetch
).
not_to
raise_error
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