fix refactor of production event fetcher

This commit is contained in:
James Lopez 2016-12-07 09:25:11 +01:00
parent bbb9f84082
commit 834bcacbae
2 changed files with 17 additions and 17 deletions

View file

@ -1,6 +1,23 @@
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class IssueEventFetcher < BaseEventFetcher 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 end
end end

View file

@ -1,23 +1,6 @@
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class ProductionEventFetcher < IssueEventFetcher 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 end
end end