summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-12-07 09:25:11 +0100
committerJames Lopez <james@jameslopez.es>2017-01-17 11:32:55 +0100
commit834bcacbaec837d8ec0a269f111bca769843bcb4 (patch)
treeaf2b264f58f0726b225e3baa2a1bd6848585bac8
parentbbb9f840824aec2467ed2580cae4d9b42b85a7d4 (diff)
downloadgitlab-ce-834bcacbaec837d8ec0a269f111bca769843bcb4.tar.gz
fix refactor of production event fetcher
-rw-r--r--lib/gitlab/cycle_analytics/issue_event_fetcher.rb17
-rw-r--r--lib/gitlab/cycle_analytics/production_event_fetcher.rb17
2 files changed, 17 insertions, 17 deletions
diff --git a/lib/gitlab/cycle_analytics/issue_event_fetcher.rb b/lib/gitlab/cycle_analytics/issue_event_fetcher.rb
index 69ba7c3cc9c..0d8da99455e 100644
--- a/lib/gitlab/cycle_analytics/issue_event_fetcher.rb
+++ b/lib/gitlab/cycle_analytics/issue_event_fetcher.rb
@@ -1,6 +1,23 @@
module Gitlab
module CycleAnalytics
class IssueEventFetcher < BaseEventFetcher
+ include IssueAllowed
+
+ def initialize(*args)
+ @projections = [issue_table[:title],
+ issue_table[:iid],
+ issue_table[:id],
+ issue_table[:created_at],
+ issue_table[:author_id]]
+
+ super(*args)
+ end
+
+ private
+
+ def serialize(event)
+ AnalyticsIssueSerializer.new(project: @project).represent(event).as_json
+ end
end
end
end
diff --git a/lib/gitlab/cycle_analytics/production_event_fetcher.rb b/lib/gitlab/cycle_analytics/production_event_fetcher.rb
index 882e780874f..0fa2e87f673 100644
--- a/lib/gitlab/cycle_analytics/production_event_fetcher.rb
+++ b/lib/gitlab/cycle_analytics/production_event_fetcher.rb
@@ -1,23 +1,6 @@
module Gitlab
module CycleAnalytics
class ProductionEventFetcher < IssueEventFetcher
- include IssueAllowed
-
- def initialize(*args)
- @projections = [issue_table[:title],
- issue_table[:iid],
- issue_table[:id],
- issue_table[:created_at],
- issue_table[:author_id]]
-
- super(*args)
- end
-
- private
-
- def serialize(event)
- AnalyticsIssueSerializer.new(project: @project).represent(event).as_json
- end
end
end
end