Permalink
Browse files

[aws][storage] fix mock region defaulting

  • Loading branch information...
geemus committed Sep 24, 2010
1 parent e95c17c commit cbacca9df10e89076ac42bcfba02d989e162beec
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/fog/aws/storage.rb
View
@@ -91,7 +91,7 @@ def self.reset_data(keys=data.keys)
def initialize(options={})
@aws_access_key_id = options[:aws_access_key_id]
- @region = options[:region] || 'us-east-1'
+ options[:region] ||= 'us-east-1'
@host = options[:host] || case options[:region]
when 'eu-west-1'
's3-eu-west-1.amazonaws.com'
@@ -104,7 +104,7 @@ def initialize(options={})
else
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
end
- @data = self.class.data[@region][@aws_access_key_id]
+ @data = self.class.data[options[:region]][@aws_access_key_id]
end
def signature(params)

0 comments on commit cbacca9

Please sign in to comment.