lib/datapimp/clients/amazon.rb in datapimp-1.0.14 vs lib/datapimp/clients/amazon.rb in datapimp-1.0.15
- old
+ new
@@ -11,10 +11,14 @@
def aws_secret_access_key
options[:aws_secret_access_key] || options[:secret_access_key] || Datapimp.config.aws_secret_access_key
end
+ def aws_region
+ options[:aws_region] || options[:region] || Datapimp.config.aws_region || "us-west-1"
+ end
+
def storage
return @storage if @storage
# Silence fog warnings
Fog::Logger.define_singleton_method(:warning) do |*args|
@@ -23,9 +27,10 @@
@storage = Fog::Storage.new({
provider: 'AWS',
aws_access_key_id: aws_access_key_id,
aws_secret_access_key: aws_secret_access_key,
+ region: aws_region,
path_style: true
})
@storage