Commit 6b3f52b4 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix cycle analytics code after improving serializers

parent 3cb37c03
...@@ -13,7 +13,7 @@ module Gitlab ...@@ -13,7 +13,7 @@ module Gitlab
end end
def as_json def as_json
AnalyticsStageSerializer.new.represent(self).as_json AnalyticsStageSerializer.new.represent(self)
end end
def title def title
......
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
private private
def serialize(event) def serialize(event)
AnalyticsMergeRequestSerializer.new(project: @project).represent(event).as_json AnalyticsMergeRequestSerializer.new(project: @project).represent(event)
end end
end end
end end
......
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
private private
def serialize(event) def serialize(event)
AnalyticsIssueSerializer.new(project: @project).represent(event).as_json AnalyticsIssueSerializer.new(project: @project).represent(event)
end end
end end
end end
......
...@@ -37,7 +37,7 @@ module Gitlab ...@@ -37,7 +37,7 @@ module Gitlab
def serialize_commit(event, st_commit, query) def serialize_commit(event, st_commit, query)
commit = Commit.new(Gitlab::Git::Commit.new(st_commit), @project) commit = Commit.new(Gitlab::Git::Commit.new(st_commit), @project)
AnalyticsCommitSerializer.new(project: @project, total_time: event['total_time']).represent(commit).as_json AnalyticsCommitSerializer.new(project: @project, total_time: event['total_time']).represent(commit)
end end
end end
end end
......
...@@ -15,7 +15,7 @@ module Gitlab ...@@ -15,7 +15,7 @@ module Gitlab
end end
def serialize(event) def serialize(event)
AnalyticsMergeRequestSerializer.new(project: @project).represent(event).as_json AnalyticsMergeRequestSerializer.new(project: @project).represent(event)
end end
end end
end end
......
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
private private
def serialize(summary_object) def serialize(summary_object)
AnalyticsSummarySerializer.new.represent(summary_object).as_json AnalyticsSummarySerializer.new.represent(summary_object)
end end
end end
end end
......
...@@ -23,7 +23,7 @@ module Gitlab ...@@ -23,7 +23,7 @@ module Gitlab
private private
def serialize(event) def serialize(event)
AnalyticsBuildSerializer.new.represent(event['build']).as_json AnalyticsBuildSerializer.new.represent(event['build'])
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment