Class: Gem::SpecFetcher

Class | Gem::SpecFetcher
In: | lib/rubygems/spec_fetcher.rb
Parent: | Object

SpecFetcher handles metadata updates from remote gem repositories.

### Methods

cache_dir fetch fetch_spec fetcher find_matching legacy_repos list load_specs new warn_legacy

### Included Modules

Gem::UserInteraction

### Public Class methods

fetcher()
new()

### Public Instance methods

cache_dir(uri)

Retuns the local directory to write `uri` to.

fetch(dependency, all = false, matching_platform = true, prerelease = false)

Fetch specs matching `dependency`. If `all` is true, all matching (released) versions are returned. If `matching_platform` is false, all platforms are returned. If `prerelease` is true, prerelease versions are included.

fetch_spec(spec, source_uri)
find_matching(dependency, all = false, matching_platform = true, prerelease = false)

Find spec names that match `dependency`. If `all` is true, all matching released versions are returned. If `matching_platform` is false, gems for all platforms are returned.

legacy_repos()

Returns Array of gem repositories that were generated with RubyGems less than 1.2.

list(all = false, prerelease = false)

Returns a list of gems available for each source in Gem::sources. If `all` is true, all released versions are returned instead of only latest versions. If `prerelease` is true, include prerelease versions.

load_specs(source_uri, file)

Loads specs in `file`, fetching from `source_uri` if the on-disk cache is out of date.

warn_legacy(exception) {|| ...}

Warn about legacy repositories if `exception` indicates only legacy repositories are available, and yield to the block. Returns false if the exception indicates some other FetchError.

[Validate]