Skip to content

Commit

Permalink
Revert "allow symbol or string for top level compute/storage"
Browse files Browse the repository at this point in the history
This reverts commit 7446988.

all the other config is strings, leave them this way for consistency
  • Loading branch information
geemus committed Nov 4, 2010
1 parent 7446988 commit 3b59607
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions lib/fog/core/compute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ module Fog
class Storage

def self.new(attributes)
case attributes.delete(:provider).to_sym
when :AWS
case attributes.delete(:provider)
when 'AWS'
require 'fog/aws'
Fog::AWS::Compute.new(attributes)
when :Bluebox
when 'Bluebox'
require 'fog/bluebox'
Fog::Bluebox::Compute.new(attributes)
when :GoGrid
when 'GoGrid'
require 'fog/go_grid'
Fog::GoGrid::Compute.new(attributes)
when :Linode
when 'Linode'
require 'fog/linode'
Fog::Linode::Compute.new(attributes)
when :NewServers
when 'NewServers'
require 'fog/new_servers'
Fog::NewServers::Compute.new(attributes)
when :Rackspace
when 'Rackspace'
require 'fog/rackspace'
Fog::Rackspace::Compute.new(attributes)
when :Slicehost
when 'Slicehost'
require 'fog/slicehost'
Fog::Slicehost::Compute.new(attributes)
else
Expand Down
10 changes: 5 additions & 5 deletions lib/fog/core/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ module Fog
class Storage

def self.new(attributes)
case provider = attributes.delete(:provider).to_sym
when :AWS
case provider = attributes.delete(:provider)
when 'AWS'
require 'fog/aws'
Fog::AWS::Storage.new(attributes)
when :Google
when 'Google'
require 'fog/google'
Fog::Google::Storage.new(attributes)
when :Local
when 'Local'
require 'fog/local'
Fog::Local::Storage.new(attributes)
when :Rackspace
when 'Rackspace'
require 'fog/rackspace'
Fog::Rackspace::Storage.new(attributes)
else
Expand Down

0 comments on commit 3b59607

Please sign in to comment.