summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-22 14:29:25 +0100
committerJames Lopez <james@jameslopez.es>2017-01-17 11:32:54 +0100
commit02e1e4819234662faddd7d8eb5c54d9bfdf9e7e6 (patch)
treed789f920c5d3dd66f140c9dcfe774ac158623ca4 /lib
parent8639ea1b0315045c0e4a5ad8d6419903507850c3 (diff)
downloadgitlab-ce-02e1e4819234662faddd7d8eb5c54d9bfdf9e7e6.tar.gz
more refactoring and fixing old specs
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/cycle_analytics/summary.rb18
1 files changed, 3 insertions, 15 deletions
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