Sha256: 6d4f38f0585f5e5fb01245abbdfce11c4621c0c4ffda2a4102f17a02f519c7ea

Contents?: true

Size: 708 Bytes

Versions: 43

Compression:

Stored size: 708 Bytes

Contents

class Google < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :storage
        Fog::Storage::Google
      else 
        raise ArgumentError, "Unsupported #{self} service: #{key}"
      end
    end

    def [](service)
      @@connections ||= Hash.new do |hash, key|
        hash[key] = case key
        when :storage
          Fog::Logger.warning("Google[:storage] is not recommended, use Storage[:google] for portability")
          Fog::Storage.new(:provider => 'Google')
        else
          raise ArgumentError, "Unrecognized service: #{key.inspect}"
        end
      end
      @@connections[service]
    end

    def services
      Fog::Google.services
    end

  end
end

Version data entries

43 entries across 43 versions & 16 rubygems

Version Path
hpfog-0.0.20 lib/fog/bin/google.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/bin/google.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/bin/google.rb
fog-nirvanix-1.8.2 lib/fog/bin/google.rb
fog-nirvanix-1.8.1 lib/fog/bin/google.rb
fog-1.10.1 lib/fog/bin/google.rb
fog-parser-fix-1.6.1 lib/fog/bin/google.rb
fog-test-again-1.6.0 lib/fog/bin/google.rb
fog-test-me-1.10.0 lib/fog/bin/google.rb
fog-parser-fix-1.6.0 lib/fog/bin/google.rb
fog-1.10.0 lib/fog/bin/google.rb
fog-1.9.0 lib/fog/bin/google.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/bin/google.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/bin/google.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/bin/google.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/bin/google.rb
fog-sgonyea-1.8.1 lib/fog/bin/google.rb
fog-1.8.0 lib/fog/bin/google.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/bin/google.rb
fog-1.7.0 lib/fog/bin/google.rb