Method: Fog::Storage::AWS::Mock#initialize

Defined in:
lib/fog/aws/storage.rb

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.


203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/fog/aws/storage.rb', line 203

def initialize(options={})
  require 'mime/types'
  @use_iam_profile = options[:use_iam_profile]
  setup_credentials(options)
  options[:region] ||= 'us-east-1'
  @host = options[:host] || case options[:region]
  when 'us-east-1'
    's3.amazonaws.com'
  else
    "s3-#{options[:region]}.amazonaws.com"
  end
  @scheme = options[:scheme] || 'https'
  @region = options[:region]
end