Class Gem::Validator
In: lib/rubygems/validator.rb
Parent: Object

Validator performs various gem file and gem database validation

Methods

Included Modules

Gem::UserInteraction

Classes and Modules

Class Gem::Validator::TestRunner

Constants

ErrorData = Struct.new :path, :problem

Public Instance methods

Checks the gem directory for the following potential inconsistencies/problems:

  • Checksum gem itself
  • For each file in each gem, check consistency of installed versions
  • Check for files that aren‘t part of the gem but are in the gems directory
  • 1 cache - 1 spec - 1 directory.

returns a hash of ErrorData objects, keyed on the problem gem‘s name.

Runs unit tests for a given gem specification

Given a gem file‘s contents, validates against its own MD5 checksum

gem_data:[String] Contents of the gem file

Given the path to a gem file, validates against its own MD5 checksum

gem_path:[String] Path to gem file

[Validate]