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 @@ ...@@ -3,11 +3,11 @@
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
module BuildsEventHelper module BuildsEventHelper
def initialize(*args) def initialize(...)
@projections = [build_table[:id]] @projections = [build_table[:id]]
@order = build_table[:created_at] @order = build_table[:created_at]
super(*args) super(...)
end end
def fetch def fetch
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
class CodeEventFetcher < BaseEventFetcher class CodeEventFetcher < BaseEventFetcher
include CodeHelper include CodeHelper
def initialize(*args) def initialize(...)
@projections = [mr_table[:title], @projections = [mr_table[:title],
mr_table[:iid], mr_table[:iid],
mr_table[:id], mr_table[:id],
...@@ -14,7 +14,7 @@ module Gitlab ...@@ -14,7 +14,7 @@ module Gitlab
mr_table[:author_id]] mr_table[:author_id]]
@order = mr_table[:created_at] @order = mr_table[:created_at]
super(*args) super(...)
end end
private private
......
...@@ -5,14 +5,14 @@ module Gitlab ...@@ -5,14 +5,14 @@ module Gitlab
class IssueEventFetcher < BaseEventFetcher class IssueEventFetcher < BaseEventFetcher
include IssueHelper include IssueHelper
def initialize(*args) def initialize(...)
@projections = [issue_table[:title], @projections = [issue_table[:title],
issue_table[:iid], issue_table[:iid],
issue_table[:id], issue_table[:id],
issue_table[:created_at], issue_table[:created_at],
issue_table[:author_id]] issue_table[:author_id]]
super(*args) super(...)
end end
private private
......
...@@ -12,8 +12,8 @@ module Gitlab ...@@ -12,8 +12,8 @@ module Gitlab
production: :read_issue production: :read_issue
}.freeze }.freeze
def self.get(*args) def self.get(...)
new(*args).get new(...).get
end end
def initialize(user:, project:) def initialize(user:, project:)
......
...@@ -5,14 +5,14 @@ module Gitlab ...@@ -5,14 +5,14 @@ module Gitlab
class PlanEventFetcher < BaseEventFetcher class PlanEventFetcher < BaseEventFetcher
include PlanHelper include PlanHelper
def initialize(*args) def initialize(...)
@projections = [issue_table[:title], @projections = [issue_table[:title],
issue_table[:iid], issue_table[:iid],
issue_table[:id], issue_table[:id],
issue_table[:created_at], issue_table[:created_at],
issue_table[:author_id]] issue_table[:author_id]]
super(*args) super(...)
end end
private private
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
class ProductionEventFetcher < BaseEventFetcher class ProductionEventFetcher < BaseEventFetcher
include ProductionHelper include ProductionHelper
def initialize(*args) def initialize(...)
@projections = [issue_table[:title], @projections = [issue_table[:title],
issue_table[:iid], issue_table[:iid],
issue_table[:id], issue_table[:id],
...@@ -13,7 +13,7 @@ module Gitlab ...@@ -13,7 +13,7 @@ module Gitlab
issue_table[:author_id], issue_table[:author_id],
routes_table[:path]] routes_table[:path]]
super(*args) super(...)
end end
private private
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
class ReviewEventFetcher < BaseEventFetcher class ReviewEventFetcher < BaseEventFetcher
include ReviewHelper include ReviewHelper
def initialize(*args) def initialize(...)
@projections = [mr_table[:title], @projections = [mr_table[:title],
mr_table[:iid], mr_table[:iid],
mr_table[:id], mr_table[:id],
...@@ -13,7 +13,7 @@ module Gitlab ...@@ -13,7 +13,7 @@ module Gitlab
mr_table[:state_id], mr_table[:state_id],
mr_table[:author_id]] mr_table[:author_id]]
super(*args) super(...)
end end
private private
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
module Gitlab module Gitlab
module CycleAnalytics module CycleAnalytics
class Updater class Updater
def self.update!(*args) def self.update!(...)
new(*args).update! new(...).update!
end end
def initialize(event_result, from:, to:, klass:) 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