Sha256: 3d994124a4f5dc90af72fb4e60141327a934bcde716a34d59f97b815d53cabbd

Contents?: true

Size: 763 Bytes

Versions: 2

Compression:

Stored size: 763 Bytes

Contents

class StormOnDemand < Fog::Bin
  class << self
    def class_for(key)
      case key
      when :storm_on_demand
        Fog::Compute::StormOnDemand
      else
        raise ArgumentError, "Unsupported #{self} service: #{key}"
      end
    end

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

    def services
      Fog::StormOnDemand.services
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-storm_on_demand-0.1.0 lib/fog/bin/storm_on_demand.rb
fog-storm_on_demand-0.0.1 lib/fog/bin/storm_on_demand.rb