fix availability check after providers fixes

This commit is contained in:
geemus 2011-02-09 16:39:37 -08:00
parent c673c28b16
commit 9591b3f7a2
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,10 @@ require 'fog/core/credentials'
module Fog module Fog
class << self class << self
def providers
@providers.select {|provider| eval("::#{provider.to_s.split('::').last}").available?}
end
def modules def modules
[ [
::Vcloud ::Vcloud

View File

@ -13,7 +13,7 @@ class AWS < Fog::Bin
Fog::AWS::ELB Fog::AWS::ELB
when :iam when :iam
Fog::AWS::IAM Fog::AWS::IAM
when :sdb when :sdb, :simpledb
Fog::AWS::SimpleDB Fog::AWS::SimpleDB
when :ses when :ses
Fog::AWS::SES Fog::AWS::SES
@ -48,7 +48,7 @@ class AWS < Fog::Bin
Fog::AWS::IAM.new Fog::AWS::IAM.new
when :eu_storage when :eu_storage
Fog::Storage.new(:provider => 'AWS', :region => 'eu-west-1') Fog::Storage.new(:provider => 'AWS', :region => 'eu-west-1')
when :sdb when :sdb, :simpledb
Fog::AWS::SimpleDB.new Fog::AWS::SimpleDB.new
when :ses when :ses
Fog::AWS::SES.new Fog::AWS::SES.new