diff options
author | James Lopez <james@jameslopez.es> | 2016-12-07 09:25:11 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 11:32:55 +0100 |
commit | 834bcacbaec837d8ec0a269f111bca769843bcb4 (patch) | |
tree | af2b264f58f0726b225e3baa2a1bd6848585bac8 /lib | |
parent | bbb9f840824aec2467ed2580cae4d9b42b85a7d4 (diff) | |
download | gitlab-ce-834bcacbaec837d8ec0a269f111bca769843bcb4.tar.gz |
fix refactor of production event fetcher
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/cycle_analytics/issue_event_fetcher.rb | 17 | ||||
-rw-r--r-- | lib/gitlab/cycle_analytics/production_event_fetcher.rb | 17 |
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 |