Class | Gem::Indexer
In: | lib/rubygems/indexer.rb
Parent: | Object

Top level class for building the gem repository index.

### Methods

abbreviate build_indicies collect_specs compact_specs compress gem_file_list generate_index gzip install_indicies new paranoid sanitize sanitize_string

### Included Modules

Gem::UserInteraction

### Attributes

dest_directory | [R] | Index install location
directory | [R] | Index build directory

### Public Class methods

new(directory)

Create an indexer that will index the gems in `directory`.

### Public Instance methods

abbreviate(spec)

Abbreviate the spec for downloading. Abbreviated specs are only used for searching, downloading and related activities and do not need deployment specific information (e.g. list of files). So we abbreviate the spec, making it much smaller for quicker downloads.

build_indicies(index)

Build various indicies

collect_specs()

Collect specifications from .gem files from the gem directory.

compact_specs(specs)

Compacts Marshal output for the specs index data source by using identical objects as much as possible.

compress(filename, extension)

Compress `filename` with `extension`.

gem_file_list()

List of gem file names to index.

generate_index()

Builds and installs indexicies.

gzip(filename)

Zlib::GzipWriter wrapper that gzips `filename` on disk.

install_indicies()

Install generated indicies into the destination directory.

paranoid(path, extension)

Ensure `path` and path with `extension` are identical.

sanitize(spec)

Sanitize the descriptive fields in the spec. Sometimes non-ASCII characters will garble the site index. Non-ASCII characters will be replaced by their XML entity equivalent.

sanitize_string(string)

Sanitize a single string.

[Validate]