Commit 388b382f authored by Mark Chao's avatar Mark Chao

Merge branch 'id-chain-command-kwargs' into 'master'

Fix Ruby 2.7 deprecation warnings for ci/pipeline/chain

See merge request gitlab-org/gitlab!43525
parents 6dfb53a8 f54121ee
......@@ -80,7 +80,7 @@ class AddressableUrlValidator < ActiveModel::EachValidator
value = strip_value!(record, attribute, value)
Gitlab::UrlBlocker.validate!(value, blocker_args)
Gitlab::UrlBlocker.validate!(value, **blocker_args)
rescue Gitlab::UrlBlocker::BlockedUrlError => e
record.errors.add(attribute, options.fetch(:blocked_message) % { exception_message: e.message })
end
......
......@@ -16,7 +16,7 @@ module Gitlab
) do
include Gitlab::Utils::StrongMemoize
def initialize(**params)
def initialize(params = {})
params.each do |key, value|
self[key] = value
end
......
......@@ -36,9 +36,9 @@ module Gitlab
def self.fabricate(resource)
case resource
when Hash
self.new(resource.symbolize_keys)
self.new(**resource.symbolize_keys)
when ::Ci::HasVariable
self.new(resource.to_runner_variable)
self.new(**resource.to_runner_variable)
when self
resource.dup
else
......
......@@ -79,7 +79,7 @@ module Gitlab
end
def fabricate(entry_class, value = nil)
entry_class.new(value, @metadata) do |node|
entry_class.new(value, **@metadata) do |node|
node.key = @attributes[:key]
node.parent = @attributes[:parent]
node.default = @attributes[:default]
......
......@@ -19,7 +19,7 @@ module Gitlab
entry = self.class.entry_class(strategy)
@subject = entry.new(config, metadata, &blk)
@subject = entry.new(config, **metadata, &blk)
super(@subject)
end
......
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