Sha256: 827171ea8cbfaf70c3dcc25f4b3c00ccabe8714064a5f66d253eebc79179aece

Contents?: true

Size: 711 Bytes

Versions: 7

Compression:

Stored size: 711 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
          Formatador.display_line("[yellow][WARN] 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

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/bin/local.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/bin/local.rb
fog-0.11.0 lib/fog/bin/local.rb
fog-0.10.0 lib/fog/bin/local.rb
fog4encbs-0.9.0.1 lib/fog/bin/local.rb
fog4encbs-0.9.0 lib/fog/bin/local.rb
fog-0.9.0 lib/fog/bin/local.rb