mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
3b59607a14
This reverts commit 74469880ef
.
all the other config is strings, leave them this way for consistency
24 lines
605 B
Ruby
24 lines
605 B
Ruby
module Fog
|
|
class Storage
|
|
|
|
def self.new(attributes)
|
|
case provider = attributes.delete(:provider)
|
|
when 'AWS'
|
|
require 'fog/aws'
|
|
Fog::AWS::Storage.new(attributes)
|
|
when 'Google'
|
|
require 'fog/google'
|
|
Fog::Google::Storage.new(attributes)
|
|
when 'Local'
|
|
require 'fog/local'
|
|
Fog::Local::Storage.new(attributes)
|
|
when 'Rackspace'
|
|
require 'fog/rackspace'
|
|
Fog::Rackspace::Storage.new(attributes)
|
|
else
|
|
raise ArgumentError.new("#{provider} is not a recognized storage provider")
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|