lib/s3_secure/aws_services/s3.rb in s3-secure-0.5.1 vs lib/s3_secure/aws_services/s3.rb in s3-secure-0.6.0
- old
+ new
@@ -6,9 +6,16 @@
def s3
check_bucket!
@@s3_clients[@bucket] ||= new_s3_regional_client
end
+ def s3_regional_client(bucket)
+ temp = @bucket
+ @bucket = bucket
+ @@s3_clients[bucket] ||= new_s3_regional_client
+ @bucket = temp
+ end
+
def new_s3_regional_client
options = {}
options[:endpoint] = "https://s3.#{region}.amazonaws.com"
options[:region] = region
Aws::S3::Client.new(options)
\ No newline at end of file