RemoteFetcher
handles the details of fetching gems and gem information from a remote source.
Given a set of Gem::Dependency
objects as needed
and a way to query the set of available specs via set
, calculates a set of ActivationRequest
objects which indicate all the specs that should be activated to meet the all the requirements.
The SourceList
represents the sources rubygems has been configured to use. A source may be created from an array of sources:
Gem::SourceList.from %w[https://rubygems.example https://internal.example]
Or by adding them:
sources = Gem::SourceList.new sources << 'https://rubygems.example'
The most common way to get a SourceList
is Gem.sources
.
Gem::StubSpecification
reads the stub: line from the gemspec. This prevents us having to eval the entire gemspec in order to find out certain information.
RubyGemTestCase provides a variety of methods for testing rubygems and gem-related behavior in a sandbox. Through RubyGemTestCase you can install and uninstall gems, fetch remote gems through a stub fetcher and be assured your normal set of gems is not affected.
Tests are always run at a safe level of 1.
An Uninstaller
.
The uninstaller fires pre and post uninstall hooks. Hooks can be added either through a rubygems_plugin.rb file in an installed gem or via a rubygems/defaults/#{RUBY_ENGINE}.rb or rubygems/defaults/operating_system.rb file. See Gem.pre_uninstall
and Gem.post_uninstall
for details.
The UriFormatter
handles URIs from user-input and escaping.
uf = Gem::UriFormatter.new 'example.com' p uf.normalize #=> 'http://example.com'
In order to execute a command on your OS, you need to define it as a Shell
method.
Alternatively, you can execute any command via Shell::CommandProcessor#system
even if it is not defined.
Raised by Timeout.timeout
when the block times out.
Raised by Timeout.timeout
when the block times out.
Base class for all URI
exceptions.
Not a URI
.
Not a URI
component.
URI
is valid, bad usage is not.
The default port for HTTPS
URIs is 443, and the scheme is ‘https:’ rather than ‘http:’. Other than that, HTTPS
URIs are identical to HTTP
URIs; see URI::HTTP
.
The default port for LDAPS
URIs is 636, and the scheme is ‘ldaps:’ rather than ‘ldap:’. Other than that, LDAPS
URIs are identical to LDAP
URIs; see URI::LDAP
.
RFC6068, The mailto URL scheme
Protocol error.
Remote host reset the connection request.
Client sent TCP reset (RST) before server has accepted the connection requested by client.