Sha256: 1f4b065c652019175d632f94b2f1f8ae6b19d0c141fec77a673b31ac4d0a2c44

Contents?: true

Size: 689 Bytes

Versions: 6

Compression:

Stored size: 689 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 deprecated, use Storage[:local] instead")
          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

6 entries across 6 versions & 3 rubygems

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