From 8a7543af7f2f41ec74d6e5c558ccaee77a823c8e Mon Sep 17 00:00:00 2001 From: Morten Trolle Date: Tue, 13 Apr 2021 00:29:39 +0200 Subject: [PATCH 1/2] Bumping AWS dependency to v3 --- lib/refile/s3/version.rb | 2 +- refile-s3.gemspec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/refile/s3/version.rb b/lib/refile/s3/version.rb index a039184..34c9a60 100644 --- a/lib/refile/s3/version.rb +++ b/lib/refile/s3/version.rb @@ -1,5 +1,5 @@ module Refile class S3 - VERSION = "0.2.0" + VERSION = "0.3.0" end end diff --git a/refile-s3.gemspec b/refile-s3.gemspec index 4b4659f..da8e203 100644 --- a/refile-s3.gemspec +++ b/refile-s3.gemspec @@ -20,8 +20,8 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 2.1.0" spec.add_dependency "refile", "~> 0.7.0" - spec.add_dependency "aws-sdk-s3", "~> 1.23" - spec.add_development_dependency "bundler", "~> 1.7" + spec.add_dependency "aws-sdk-s3", "~> 1.93" + spec.add_development_dependency "bundler", "~> 2.2" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rspec", "~> 3.0" spec.add_development_dependency "webmock" From 9ada9204a45f71f6184f101709430b02a3deabb0 Mon Sep 17 00:00:00 2001 From: Morten Trolle Date: Tue, 27 Apr 2021 00:25:42 +0200 Subject: [PATCH 2/2] in an aws environment you might not need access_key_id --- lib/refile/s3.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/refile/s3.rb b/lib/refile/s3.rb index 25187a2..d70c4f9 100644 --- a/lib/refile/s3.rb +++ b/lib/refile/s3.rb @@ -45,7 +45,7 @@ def initialize(region:, bucket:, max_size: nil, prefix: nil, hasher: Refile::Ran @s3 = Aws::S3::Resource.new @s3_options credentials = @s3.client.config.credentials raise S3CredentialsError unless credentials - @access_key_id = credentials.access_key_id + @access_key_id = credentials.access_key_id rescue nil @bucket_name = bucket @bucket = @s3.bucket @bucket_name @hasher = hasher