Class | Gem::RemoteFetcher
In: | lib/rubygems/remote_fetcher.rb
Parent: | Object

RemoteFetcher handles the details of fetching gems and gem information from a remote source.

### Methods

download fetch_path fetch_size fetcher new

### Included Modules

Gem::UserInteraction

### Classes and Modules

Class Gem::RemoteFetcher::FetchError

### Public Class methods

fetcher()

Cached RemoteFetcher instance.

new(proxy)

Initialize a remote fetcher using the source URI and possible proxy information.

`proxy`

- [String]: explicit specification of proxy; overrides any environment

                variable setting

- nil: respect environment variables (HTTP_PROXY, HTTP_PROXY_USER,

           HTTP_PROXY_PASS)

- `:no_proxy`: ignore environment variables and _don‘t_ use a proxy

### Public Instance methods

download(spec, source_uri, install_dir = Gem.dir)

Moves the gem `spec` from `source_uri` to the cache dir unless it is already there. If the source_uri is local the gem cache dir copy is always replaced.

fetch_path(uri)

Downloads `uri` and returns it as a String.

fetch_size(uri)

Returns the size of `uri` in bytes.

[Validate]