From 9591b3f7a26572aaab4eaa0060b2b91612b315a4 Mon Sep 17 00:00:00 2001 From: geemus Date: Wed, 9 Feb 2011 16:39:37 -0800 Subject: [PATCH] fix availability check after providers fixes --- lib/fog/bin.rb | 4 ++++ lib/fog/bin/aws.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/fog/bin.rb b/lib/fog/bin.rb index 8939b3ba5..00e542588 100644 --- a/lib/fog/bin.rb +++ b/lib/fog/bin.rb @@ -3,6 +3,10 @@ require 'fog/core/credentials' module Fog class << self + def providers + @providers.select {|provider| eval("::#{provider.to_s.split('::').last}").available?} + end + def modules [ ::Vcloud diff --git a/lib/fog/bin/aws.rb b/lib/fog/bin/aws.rb index c7294836f..922e6e762 100644 --- a/lib/fog/bin/aws.rb +++ b/lib/fog/bin/aws.rb @@ -13,7 +13,7 @@ class AWS < Fog::Bin Fog::AWS::ELB when :iam Fog::AWS::IAM - when :sdb + when :sdb, :simpledb Fog::AWS::SimpleDB when :ses Fog::AWS::SES @@ -48,7 +48,7 @@ class AWS < Fog::Bin Fog::AWS::IAM.new when :eu_storage Fog::Storage.new(:provider => 'AWS', :region => 'eu-west-1') - when :sdb + when :sdb, :simpledb Fog::AWS::SimpleDB.new when :ses Fog::AWS::SES.new