Sha256: 84daec7d4fa92b2f0eae8dcb392bfae4b7f086cb093a7cf2fe8b6c9968bd817d

Contents?: true

Size: 681 Bytes

Versions: 6

Compression:

Stored size: 681 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 deprecated, use Compute[:voxel] instead")
          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

6 entries across 6 versions & 3 rubygems

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