Class: Gem::Validator

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

Validator performs various gem file and gem database validation

### Methods

alien remove_leading_dot_dir unit_test verify_gem verify_gem_file

### Included Modules

Gem::UserInteraction

### Classes and Modules

Class Gem::Validator::TestRunner

### Constants

ErrorData | = | Struct.new :path, :problem

### Public Instance methods

alien(gems=[])

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.

remove_leading_dot_dir(path)
unit_test(gem_spec)

Runs unit tests for a given gem specification

verify_gem(gem_data)

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

gem_data: | [String] Contents of the gem file

verify_gem_file(gem_path)

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

gem_path: | [String] Path to gem file

[Validate]