aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/s3_uri_signer.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-23 21:02:56 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-23 21:02:56 +0900
commit31a6eaabc165d8a222e176f2c809d90622d88ec2 (patch)
treeb5333db2c13888ede5062ccd8ecca649ea261b4c /lib/rubygems/s3_uri_signer.rb
parentf56fc720ee8cd4b79824a1c3843058b662a302bd (diff)
downloadruby-31a6eaabc165d8a222e176f2c809d90622d88ec2.tar.gz
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
Diffstat (limited to 'lib/rubygems/s3_uri_signer.rb')
-rw-r--r--lib/rubygems/s3_uri_signer.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rubygems/s3_uri_signer.rb b/lib/rubygems/s3_uri_signer.rb
index c0b88842a0..3f76eeeb15 100644
--- a/lib/rubygems/s3_uri_signer.rb
+++ b/lib/rubygems/s3_uri_signer.rb
@@ -6,7 +6,9 @@ require 'rubygems/openssl'
# S3URISigner implements AWS SigV4 for S3 Source to avoid a dependency on the aws-sdk-* gems
# More on AWS SigV4: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
class Gem::S3URISigner
+
class ConfigurationError < Gem::Exception
+
def initialize(message)
super message
end
@@ -14,9 +16,11 @@ class Gem::S3URISigner
def to_s # :nodoc:
"#{super}"
end
+
end
class InstanceProfileError < Gem::Exception
+
def initialize(message)
super message
end
@@ -24,6 +28,7 @@ class Gem::S3URISigner
def to_s # :nodoc:
"#{super}"
end
+
end
attr_accessor :uri
@@ -174,4 +179,5 @@ class Gem::S3URISigner
BASE64_URI_TRANSLATE = { "+" => "%2B", "/" => "%2F", "=" => "%3D", "\n" => "" }.freeze
EC2_IAM_INFO = "http://169.254.169.254/latest/meta-data/iam/info".freeze
EC2_IAM_SECURITY_CREDENTIALS = "http://169.254.169.254/latest/meta-data/iam/security-credentials/".freeze
+
end