From 408e71a490d3e302ee121a57adacb8725eb4785c Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Sat, 6 Feb 2021 16:04:07 +0000 Subject: [PATCH] clean unused options, prefer using kwargs redirectionn for #aws_sdk_authentication instead --- lib/httpx/plugins/aws_sdk_authentication.rb | 10 ++++++++-- lib/httpx/plugins/aws_sigv4.rb | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/httpx/plugins/aws_sdk_authentication.rb b/lib/httpx/plugins/aws_sdk_authentication.rb index 8af56731..021cc7f6 100644 --- a/lib/httpx/plugins/aws_sdk_authentication.rb +++ b/lib/httpx/plugins/aws_sdk_authentication.rb @@ -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 diff --git a/lib/httpx/plugins/aws_sigv4.rb b/lib/httpx/plugins/aws_sigv4.rb index 5144a1cd..2b6fdb77 100644 --- a/lib/httpx/plugins/aws_sigv4.rb +++ b/lib/httpx/plugins/aws_sigv4.rb @@ -148,8 +148,6 @@ module HTTPX Signer.new(signer) end end - - def_option(:sigv4_password) end.new.merge(options) end