Commit 8da908f3 authored by Lucas Charles's avatar Lucas Charles

Fix Ruby 2.7 deprecations

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/257438
parent b06f1cdd
......@@ -41,10 +41,8 @@ module API
note = ::Notes::CreateVisualReviewService.new(
merge_request,
current_user,
{
body: params[:body],
position: params[:position]
}
body: params[:body],
position: params[:position]
).execute
if note.valid?
......
......@@ -40,7 +40,7 @@ module API
params = { has_length: has_length }
params[:maximum_size] = maximum_size unless has_length
::Packages::PackageFileUploader.workhorse_authorize(params)
::Packages::PackageFileUploader.workhorse_authorize(**params)
end
def authorize_upload!(subject = user_project)
......
......@@ -23,7 +23,7 @@ module API
def initialize(object, options = {})
options = options.opts_hash if options.is_a?(Grape::Entity::Options)
super(object.present(options), options)
super(object.present(options), **options)
end
end
end
......
......@@ -42,7 +42,7 @@ module API
def package_finder(finder_params = {})
::Packages::Nuget::PackageFinder.new(
authorized_user_project,
finder_params.merge(package_name: params[:package_name])
**finder_params.merge(package_name: params[:package_name])
)
end
end
......
......@@ -55,7 +55,7 @@ module API
export_strategy = if after_export_params[:url].present?
params = after_export_params.slice(:url, :http_method).symbolize_keys
Gitlab::ImportExport::AfterExportStrategies::WebUploadStrategy.new(params)
Gitlab::ImportExport::AfterExportStrategies::WebUploadStrategy.new(**params)
end
if export_strategy&.invalid?
......
......@@ -51,7 +51,7 @@ module API
def find_project_with_access(params)
project = find_project!(
::Gitlab::Jira::Dvcs.restore_full_path(params.slice(:namespace, :project).symbolize_keys)
::Gitlab::Jira::Dvcs.restore_full_path(**params.slice(:namespace, :project).symbolize_keys)
)
not_found! unless can?(current_user, :download_code, project)
project
......
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