lib/datapimp/clients/amazon.rb in datapimp-1.0.23 vs lib/datapimp/clients/amazon.rb in datapimp-1.0.24

- old
+ new

@@ -12,11 +12,11 @@ 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" + options[:aws_region] || options[:region] || Datapimp.config.aws_region || "us-east-1" end def storage return @storage if @storage @@ -31,18 +31,27 @@ aws_secret_access_key: aws_secret_access_key, region: aws_region, path_style: true }) - @storage end def cdn @cdn ||= Fog::CDN.new({ provider: 'AWS', aws_access_key_id: aws_access_key_id, - aws_secret_access_key: aws_secret_access_key + aws_secret_access_key: aws_secret_access_key, + region: aws_region + }) + end + + def compute + @compute ||= Fog::Compute.new({ + provider: 'AWS', + aws_access_key_id: aws_access_key_id, + aws_secret_access_key: aws_secret_access_key, + region: aws_region }) end def s3_bucket_website_url if s3_bucket.is_a?(Fog::Storage::AWS::Directory)