diff --git a/lib/fog/bin/gce.rb b/lib/fog/bin/gce.rb deleted file mode 100644 index 144303655..000000000 --- a/lib/fog/bin/gce.rb +++ /dev/null @@ -1,36 +0,0 @@ -class Google < Fog::Bin - class << self - - def class_for(key) - case key - when :compute - Fog::Compute::Google - else - raise ArgumentError, "Unrecognized service: #{key}" - end - end - - def [](service) - @@connections ||= Hash.new do |hash, key| - hash[key] = case key - when :compute - Fog::Logger.warning("Google[:compute] is not recommended, use - Compute[:google] for portability") - Fog::Compute.new(:provider => 'Google') - else - raise ArgumentError, "Unrecognized service: #{key.inspect}" - end - end - @@connections[service] - end - - def account - @@connections[:compute].account - end - - def services - Fog::Google.services - end - - end -end diff --git a/lib/fog/bin/google.rb b/lib/fog/bin/google.rb index 814bad8e6..8a58b69c3 100644 --- a/lib/fog/bin/google.rb +++ b/lib/fog/bin/google.rb @@ -3,6 +3,8 @@ class Google < Fog::Bin def class_for(key) case key + when :compute + Fog::Compute::Google when :storage Fog::Storage::Google else @@ -16,6 +18,9 @@ class Google < Fog::Bin when :storage Fog::Logger.warning("Google[:storage] is not recommended, use Storage[:google] for portability") Fog::Storage.new(:provider => 'Google') + when :compute + Fog::Logger.warning("Google[:compute] is not recommended, use Compute[:google] for portability") + Fog::Compute.new(:provider => 'Google') else raise ArgumentError, "Unrecognized service: #{key.inspect}" end @@ -23,6 +28,10 @@ class Google < Fog::Bin @@connections[service] end + def account + @@connections[:compute].account + end + def services Fog::Google.services end