Sha256: 3f6a3dc03e1ca883a96d6158f4f343a870add27557a40683e786395621e7a276

Contents?: true

Size: 695 Bytes

Versions: 18

Compression:

Stored size: 695 Bytes

Contents

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

    def services
      Fog::Atmos.services
    end
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/bin/atmos.rb
fog-1.28.0 lib/fog/bin/atmos.rb
fog-1.27.0 lib/fog/bin/atmos.rb
fog-1.26.0 lib/fog/bin/atmos.rb
fog-1.25.0 lib/fog/bin/atmos.rb
nsidc-fog-1.24.1 lib/fog/bin/atmos.rb
fog-1.24.0 lib/fog/bin/atmos.rb
ns-fog-1.22.11 lib/fog/bin/atmos.rb
ns-fog-1.22.10 lib/fog/bin/atmos.rb
ns-fog-1.22.9 lib/fog/bin/atmos.rb
ns-fog-1.22.8 lib/fog/bin/atmos.rb
ns-fog-1.22.7 lib/fog/bin/atmos.rb
ns-fog-1.22.6 lib/fog/bin/atmos.rb
fog-1.23.0 lib/fog/bin/atmos.rb
ns-fog-1.22.4 lib/fog/bin/atmos.rb
ns-fog-1.22.3 lib/fog/bin/atmos.rb
ns-fog-1.22.2 lib/fog/bin/atmos.rb
fog-1.22.1 lib/fog/bin/atmos.rb