clean unused options, prefer using kwargs redirectionn for #aws_sdk_authentication instead

This commit is contained in:
HoneyryderChuck 2021-02-06 16:04:07 +00:00
parent 1724c0f913
commit 408e71a490
2 changed files with 8 additions and 4 deletions

View File

@ -3,9 +3,15 @@
module HTTPX
module Plugins
#
# This plugin adds helper methods to apply AWS Sigv4 to AWS cloud requests.
# This plugin applies AWS Sigv4 to requests, using the AWS SDK credentials and configuration.
#
# It requires the "aws-sdk-core" gem.
#
module AwsSdkAuthentication
#
# encapsulates access to an AWS SDK credentials store.
#
class Credentials
def initialize(aws_credentials)
@aws_credentials = aws_credentials
@ -56,7 +62,7 @@ module HTTPX
# aws_authentication(credentials: Aws::Credentials.new('akid', 'secret'))
# aws_authentication()
#
def aws_sdk_authentication(options = {})
def aws_sdk_authentication(**options)
credentials = AwsSdkAuthentication.credentials
region = AwsSdkAuthentication.region

View File

@ -148,8 +148,6 @@ module HTTPX
Signer.new(signer)
end
end
def_option(:sigv4_password)
end.new.merge(options)
end