summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-17 14:14:23 +0100
committerJames Lopez <james@jameslopez.es>2016-11-17 14:14:23 +0100
commitaf80fcb477d13c240d8f58abab7d2b88a11ca7b5 (patch)
tree152a59e0419c99eb9ba6df1543c177b922d8253b
parented39d61d746925e49d952bd8169499d3200ae68b (diff)
downloadgitlab-ce-af80fcb477d13c240d8f58abab7d2b88a11ca7b5.tar.gz
fix specs
-rw-r--r--lib/gitlab/cycle_analytics/base_event.rb4
-rw-r--r--lib/gitlab/cycle_analytics/issue_event.rb2
-rw-r--r--lib/gitlab/cycle_analytics/plan_event.rb2
-rw-r--r--lib/gitlab/cycle_analytics/review_event.rb2
-rw-r--r--spec/lib/gitlab/cycle_analytics/shared_event_spec.rb10
5 files changed, 10 insertions, 10 deletions
diff --git a/lib/gitlab/cycle_analytics/base_event.rb b/lib/gitlab/cycle_analytics/base_event.rb
index 254e3621575..3c43fb24c61 100644
--- a/lib/gitlab/cycle_analytics/base_event.rb
+++ b/lib/gitlab/cycle_analytics/base_event.rb
@@ -10,7 +10,7 @@ module Gitlab
@order || @start_time_attrs
end
- def query(base_query); end
+ def query(_base_query); end
def fetch(query)
query.execute(self).map { |event| serialize(event, query) }
@@ -18,7 +18,7 @@ module Gitlab
private
- def serialize(event, query)
+ def serialize(_event, _query)
raise NotImplementedError.new("Expected #{self.name} to implement serialize(event)")
end
end
diff --git a/lib/gitlab/cycle_analytics/issue_event.rb b/lib/gitlab/cycle_analytics/issue_event.rb
index 9cfcdc9b20e..9ae2c481158 100644
--- a/lib/gitlab/cycle_analytics/issue_event.rb
+++ b/lib/gitlab/cycle_analytics/issue_event.rb
@@ -13,7 +13,7 @@ module Gitlab
issue_table[:created_at],
issue_table[:author_id]]
- def self.serialize(event, query)
+ def self.serialize(event, query)#
event['author'] = User.find(event.delete('author_id'))
AnalyticsIssueSerializer.new(project: query.project).represent(event).as_json
diff --git a/lib/gitlab/cycle_analytics/plan_event.rb b/lib/gitlab/cycle_analytics/plan_event.rb
index b8107b06228..4980a7835eb 100644
--- a/lib/gitlab/cycle_analytics/plan_event.rb
+++ b/lib/gitlab/cycle_analytics/plan_event.rb
@@ -41,4 +41,4 @@ module Gitlab
end
end
end
-end \ No newline at end of file
+end
diff --git a/lib/gitlab/cycle_analytics/review_event.rb b/lib/gitlab/cycle_analytics/review_event.rb
index dcd138eaa92..82095b23b71 100644
--- a/lib/gitlab/cycle_analytics/review_event.rb
+++ b/lib/gitlab/cycle_analytics/review_event.rb
@@ -11,7 +11,7 @@ module Gitlab
mr_table[:state],
mr_table[:author_id]]
- def self.serialize(event, _query)
+ def self.serialize(event, query)
event['author'] = User.find(event.delete('author_id'))
AnalyticsMergeRequestSerializer.new(project: query.project).represent(event).as_json
diff --git a/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb b/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
index b15af783dfb..1e76edce633 100644
--- a/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
@@ -5,15 +5,15 @@ shared_examples 'default query config' do
expect(described_class.start_time_attrs).not_to be_nil
end
+ it 'has the stage attribute' do
+ expect(described_class.stage).not_to be_nil
+ end
+
it 'has the end attributes' do
- expect(described_class.end_time_attrs ).not_to be_nil
+ expect(described_class.end_time_attrs).not_to be_nil
end
it 'has the projection attributes' do
expect(described_class.projections).not_to be_nil
end
-
- it 'implements the fetch method' do
- expect(described_class.fetch).not_to raise_error
- end
end