Sha256: b80d69eb9ef7ef52cd5f21f1bd6ff00683f5cef3bff12f00b3dc7b87d027aebe

Contents?: true

Size: 699 Bytes

Versions: 29

Compression:

Stored size: 699 Bytes

Contents

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

    def services
      Fog::Local.services
    end
  end
end

Version data entries

29 entries across 27 versions & 6 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-local-0.5.0/lib/fog/bin/local.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-local-0.5.0/lib/fog/bin/local.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-local-0.5.0/lib/fog/bin/local.rb
fog-local-0.5.0 lib/fog/bin/local.rb
fog-local-0.4.0 lib/fog/bin/local.rb
fog-local-0.3.1 lib/fog/bin/local.rb
fog-local-0.3.0 lib/fog/bin/local.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-local-0.2.1/lib/fog/bin/local.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/bin/local.rb
fog-local-0.2.1 lib/fog/bin/local.rb
fog-local-0.2.0 lib/fog/bin/local.rb
fog-1.28.0 lib/fog/bin/local.rb
fog-local-0.1.0 lib/fog/bin/local.rb
fog-1.27.0 lib/fog/bin/local.rb
fog-1.26.0 lib/fog/bin/local.rb
fog-1.25.0 lib/fog/bin/local.rb
nsidc-fog-1.24.1 lib/fog/bin/local.rb
fog-1.24.0 lib/fog/bin/local.rb
ns-fog-1.22.11 lib/fog/bin/local.rb
ns-fog-1.22.10 lib/fog/bin/local.rb