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 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

View File

@ -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