From 02e1e4819234662faddd7d8eb5c54d9bfdf9e7e6 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 22 Nov 2016 14:29:25 +0100 Subject: more refactoring and fixing old specs --- lib/gitlab/cycle_analytics/summary.rb | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/cycle_analytics/summary.rb b/lib/gitlab/cycle_analytics/summary.rb index 7d172855a94..5f0103c9d5a 100644 --- a/lib/gitlab/cycle_analytics/summary.rb +++ b/lib/gitlab/cycle_analytics/summary.rb @@ -9,9 +9,9 @@ module Gitlab end def data - [serialize(issue), - serialize(commit), - serialize(deploy)] + [serialize(Summary::Issue.new(project: @project, from: @from)), + serialize(Summary::Commit.new(project: @project, from: @from)), + serialize(Summary::Deploy.new(project: @project, from: @from))] end private @@ -19,18 +19,6 @@ module Gitlab def serialize(summary_object) AnalyticsSummarySerializer.new.represent(summary_object).as_json end - - def issue - Summary::Issue.new(project: @project, from: @from) - end - - def deploy - Summary::Deploy.new(project: @project, from: @from) - end - - def commit - Summary::Commit.new(project: @project, from: @from) - end end end end -- cgit v1.2.1