Sha256: 85bbd512a0fcc74631ab95071da0d2e4e9afa5b88096cd64b9e1bc021c4a45b1

Contents?: true

Size: 692 Bytes

Versions: 13

Compression:

Stored size: 692 Bytes

Contents

class Voxel < Fog::Bin
  class << self
    def class_for(key)
      case key
      when :compute
        Fog::Compute::Voxel
      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("Voxel[:compute] is not recommended, use Compute[:voxel] for portability")
          Fog::Compute.new(:provider => 'Voxel')
        else
          raise ArgumentError, "Unrecognized service: #{key.inspect}"
        end
      end
      @@connections[service]
    end

    def services
      Fog::Voxel.services
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/bin/voxel.rb
fog-1.24.0 lib/fog/bin/voxel.rb
ns-fog-1.22.11 lib/fog/bin/voxel.rb
ns-fog-1.22.10 lib/fog/bin/voxel.rb
ns-fog-1.22.9 lib/fog/bin/voxel.rb
ns-fog-1.22.8 lib/fog/bin/voxel.rb
ns-fog-1.22.7 lib/fog/bin/voxel.rb
ns-fog-1.22.6 lib/fog/bin/voxel.rb
fog-1.23.0 lib/fog/bin/voxel.rb
ns-fog-1.22.4 lib/fog/bin/voxel.rb
ns-fog-1.22.3 lib/fog/bin/voxel.rb
ns-fog-1.22.2 lib/fog/bin/voxel.rb
fog-1.22.1 lib/fog/bin/voxel.rb