Commit a30b3c35 authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'ck3g-fix-kwargs-warnings-batch-5' into 'master'

Fix kwargs deprecation warnings for Ruby 2.7

See merge request gitlab-org/gitlab!49590
parents 651e25b2 d798b177
......@@ -16,7 +16,7 @@ module ActiveRecord
options[:null] = false if options[:null].nil?
[:created_at, :updated_at].each do |column_name|
column(column_name, :datetime_with_timezone, options)
column(column_name, :datetime_with_timezone, **options)
end
end
......@@ -27,7 +27,7 @@ module ActiveRecord
# t.datetime_with_timezone :did_something_at
# end
def datetime_with_timezone(column_name, **options)
column(column_name, :datetime_with_timezone, options)
column(column_name, :datetime_with_timezone, **options)
end
# Disable timestamp alias to datetime
......
......@@ -8,7 +8,7 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
before_action -> { authorize_view_by_action!(:read_group_repository_analytics) }
def show
track_event(pageview_tracker_params)
track_event(**pageview_tracker_params)
end
private
......
......@@ -17,7 +17,7 @@ module VisibleApprovable
options = { target: :users }
options[:code_owner] = false if exclude_code_owners
approvers = approval_state.filtered_approvers(options)
approvers = approval_state.filtered_approvers(**options)
approvers.uniq!
approvers
end
......
......@@ -76,7 +76,7 @@ module DastOnDemandScans
def create_pipeline
params = default_config.merge(scanner_profile_config)
result = ::Ci::RunDastScanService.new(container, current_user).execute(params)
result = ::Ci::RunDastScanService.new(container, current_user).execute(**params)
return success_response(result.payload) if result.success?
......
......@@ -58,7 +58,7 @@ module Security
action = attributes_for_commit[:actions].first
Gitlab::Tracking.event(
self.class.to_s, action[:action], { label: action[:default_values_overwritten].to_s }
self.class.to_s, action[:action], label: action[:default_values_overwritten].to_s
)
end
end
......
......@@ -8,8 +8,8 @@ module EE
attr_accessor :total_geo_registries
def initialize(*)
super
def initialize(...)
super(...)
@total_geo_registries = 0
end
......
......@@ -59,7 +59,7 @@ module Banzai
super(object_sym, tooltip: false)
end
def data_attributes_for(text, parent, object, data = {})
def data_attributes_for(text, parent, object, **data)
super.merge(project_path: parent.full_path, iid: object.iid, mr_title: object.title)
end
......
......@@ -5,8 +5,8 @@ module Gitlab
module Project
module Sample
class RelationTreeRestorer < ImportExport::RelationTreeRestorer
def initialize(*args)
super
def initialize(...)
super(...)
@date_calculator = Gitlab::ImportExport::Project::Sample::DateCalculator.new(dates)
end
......
......@@ -155,7 +155,7 @@ module Gitlab
transform_sub_relations!(data_hash, sub_relation_key, sub_relation_definition, relation_index)
end
relation = @relation_factory.create(relation_factory_params(relation_key, data_hash))
relation = @relation_factory.create(**relation_factory_params(relation_key, data_hash))
if relation && !relation.valid?
@shared.logger.warn(
......
......@@ -67,7 +67,7 @@ module Gitlab
batch_size: 1000
}
relation.find_each(find_params) do |upload|
relation.find_each(**find_params) do |upload|
clean(upload.retrieve_uploader, dry_run: dry_run)
sleep sleep_time if sleep_time
rescue => err
......
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