Sha256: f0526f32191606b0eefc0c41fe74dcb5c7dc78bbea06c799aacf24df7e7646e7

Contents?: true

Size: 695 Bytes

Versions: 6

Compression:

Stored size: 695 Bytes

Contents

class GoGrid < Fog::Bin
  class << self

    def class_for(key)
      case key
      when :compute
        Fog::Compute::GoGrid
      else 
        raise ArgumentError, "Unsupported #{self} service: #{key}"
      end
    end

    def [](service)
      @@connections ||= Hash.new do |hash, key|
        hash[key] = case key
        when :compute
          Fog::Logger.warning("GoGrid[:compute] is deprecated, use Compute[:gogrid] instead")
          Fog::Compute.new(:provider => 'GoGrid')
        else
          raise ArgumentError, "Unrecognized service: #{key.inspect}"
        end
      end
      @@connections[service]
    end

    def services
      Fog::GoGrid.services
    end

  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb
tag-fog-1.0.1 lib/fog/bin/go_grid.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/go_grid.rb
fog-1.0.0 lib/fog/bin/go_grid.rb