2016-11-22 10:46:02 +00:00
|
|
|
module Gitlab
|
|
|
|
module CycleAnalytics
|
|
|
|
module Summary
|
|
|
|
extend self
|
|
|
|
|
|
|
|
def initialize(project, from:)
|
|
|
|
@project = project
|
|
|
|
@from = from
|
|
|
|
end
|
|
|
|
|
|
|
|
def data
|
2016-11-22 13:29:25 +00:00
|
|
|
[serialize(Summary::Issue.new(project: @project, from: @from)),
|
|
|
|
serialize(Summary::Commit.new(project: @project, from: @from)),
|
|
|
|
serialize(Summary::Deploy.new(project: @project, from: @from))]
|
2016-11-22 10:46:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def serialize(summary_object)
|
|
|
|
AnalyticsSummarySerializer.new.represent(summary_object).as_json
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|