Commit 8da24a1e authored by Tan Le's avatar Tan Le

Fix keyword args warning on cycle analytics specs

This commit fixes Ruby 2.7 kwargs deprecation warnings such as:

  warning: Using the last argument as keyword parameters is deprecated;
  maybe ** should be added to the call
parent 34cae340
......@@ -3,11 +3,11 @@
module Gitlab
module CycleAnalytics
module BuildsEventHelper
def initialize(*args)
def initialize(...)
@projections = [build_table[:id]]
@order = build_table[:created_at]
super(*args)
super(...)
end
def fetch
......
......@@ -5,7 +5,7 @@ module Gitlab
class CodeEventFetcher < BaseEventFetcher
include CodeHelper
def initialize(*args)
def initialize(...)
@projections = [mr_table[:title],
mr_table[:iid],
mr_table[:id],
......@@ -14,7 +14,7 @@ module Gitlab
mr_table[:author_id]]
@order = mr_table[:created_at]
super(*args)
super(...)
end
private
......
......@@ -5,14 +5,14 @@ module Gitlab
class IssueEventFetcher < BaseEventFetcher
include IssueHelper
def initialize(*args)
def initialize(...)
@projections = [issue_table[:title],
issue_table[:iid],
issue_table[:id],
issue_table[:created_at],
issue_table[:author_id]]
super(*args)
super(...)
end
private
......
......@@ -12,8 +12,8 @@ module Gitlab
production: :read_issue
}.freeze
def self.get(*args)
new(*args).get
def self.get(...)
new(...).get
end
def initialize(user:, project:)
......
......@@ -5,14 +5,14 @@ module Gitlab
class PlanEventFetcher < BaseEventFetcher
include PlanHelper
def initialize(*args)
def initialize(...)
@projections = [issue_table[:title],
issue_table[:iid],
issue_table[:id],
issue_table[:created_at],
issue_table[:author_id]]
super(*args)
super(...)
end
private
......
......@@ -5,7 +5,7 @@ module Gitlab
class ProductionEventFetcher < BaseEventFetcher
include ProductionHelper
def initialize(*args)
def initialize(...)
@projections = [issue_table[:title],
issue_table[:iid],
issue_table[:id],
......@@ -13,7 +13,7 @@ module Gitlab
issue_table[:author_id],
routes_table[:path]]
super(*args)
super(...)
end
private
......
......@@ -5,7 +5,7 @@ module Gitlab
class ReviewEventFetcher < BaseEventFetcher
include ReviewHelper
def initialize(*args)
def initialize(...)
@projections = [mr_table[:title],
mr_table[:iid],
mr_table[:id],
......@@ -13,7 +13,7 @@ module Gitlab
mr_table[:state_id],
mr_table[:author_id]]
super(*args)
super(...)
end
private
......
......@@ -3,8 +3,8 @@
module Gitlab
module CycleAnalytics
class Updater
def self.update!(*args)
new(*args).update!
def self.update!(...)
new(...).update!
end
def initialize(event_result, from:, to:, klass:)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment