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

Top level class for building the gem repository index.

Methods

Included Modules

Gem::UserInteraction

Attributes

build_legacy  [RW]  Build indexes for RubyGems older than 1.2.0 when true
build_modern  [RW]  Build indexes for RubyGems 1.2.0 and newer when true
dest_directory  [R]  Index install location
dest_latest_specs_index  [R]  Latest specs index install location
dest_prerelease_specs_index  [R]  Prerelease specs index install location
dest_specs_index  [R]  Specs index install location
directory  [R]  Index build directory

Public Class methods

Create an indexer that will index the gems in directory.

Public Instance methods

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 various indicies

Builds indicies for RubyGems older than 1.2.x

Builds Marshal quick index gemspecs.

Build a single index for RubyGems 1.2 and newer

Builds indicies for RubyGems 1.2 and newer. Handles full, latest, prerelease

Builds an RSS feed for past two days gem releases according to the gem‘s date.

Collect specifications from .gem files from the gem directory.

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

Compress filename with extension.

Compresses indicies on disk

List of gem file names to index.

Builds and installs indicies.

Zlib::GzipWriter wrapper that gzips filename on disk.

Install generated indicies into the destination directory.

Make directories for index generation

Ensure path and path with extension are identical.

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 a single string.

Perform an in-place update of the repository from newly added gems. Only works for modern indicies, and sets build_legacy to false when run.

Combines specs in index and source then writes out a new copy to dest. For a latest index, does not ensure the new file is minimal.

[Validate]