Fix deprecation warnings (#12339)

* Fix deprecation warnings in Images::Optimizer

The deprecation warnings were:

warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
warning: The called method `cloudinary' is defined here

and

warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
warning: The called method `imgproxy' is defined here

* Fix deprecation warning in Slack::Messengers::ArticlePublished

The deprecation warning was:

warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
warning: The called method `initialize' is defined here
This commit is contained in:
Dany Marcoux 2021-01-20 10:01:20 +01:00 committed by GitHub
parent 2f3764be89
commit 4022ea9fc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -4,9 +4,9 @@ module Images
return img_src if img_src.blank? || img_src.starts_with?("/")
if imgproxy_enabled?
imgproxy(img_src, kwargs)
imgproxy(img_src, **kwargs)
else
cloudinary(img_src, kwargs)
cloudinary(img_src, **kwargs)
end
end

View file

@ -10,8 +10,8 @@ module Slack
@article = article
end
def self.call(*args)
new(*args).call
def self.call(**args)
new(**args).call
end
def call