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)

Fetch specs matching `dependency`. If `all` is true, all matching versions are returned. If `matching_platform` is false, all platforms are returned.

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

Find spec names that match `dependency`. If `all` is true, all matching 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)

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

load_specs(source_uri, file)
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]