Zlib::GzipWriter
wrapper that gzips filename
on disk.
Changes in rubygems to lazily loading ‘rubygems/command` (in order to lazily load `optparse` as a side effect) affect bundler’s custom installer which uses ‘Gem::Command` without requiring it (up until bundler 2.2.29). This hook is to compensate for that missing require.
TODO: Remove when rubygems no longer supports running on bundler older than 2.2.29.
Installs the gem and returns a loaded Gem::Specification
for the installed gem.
The gem will be installed with the following structure:
@gem_home/ cache/<gem-version>.gem #=> a cached copy of the installed gem gems/<gem-version>/... #=> extracted files specifications/<gem-version>.gemspec #=> the Gem::Specification
Verifies that this gem:
Contains a valid gem specification
Contains a contents archive
The contents archive is not corrupt
After verification the gem specification from the gem is available from spec
Noop this out so there are no anchors
Performs a Net::HTTP
request of type request_class
on uri
returning a Net::HTTP
response object. request maintains a table of persistent connections to reduce connect overhead.
Installs gems for this RequestSet
using the Gem::Installer
options
.
If a block
is given an activation request
and installer
are yielded. The installer
will be nil
if a gem matching the request was already installed.
Returns the first source in the list.
Returns a Gem::StubSpecification
for every installed gem
Recursively walk dependencies of this spec, executing the block
for each hop.
Performs the uninstall of the gem. This removes the spec, the Gem
directory, and the cached .gem file.
Prints a formatted backtrace to the errors stream if backtraces are enabled.
Sets userinfo, argument is string like ‘name:pass’.
Returns the userinfo, either as ‘user’ or ‘user:password’.
v
Public setter for the host component v
(with validation).
See also URI::Generic.check_host
.
require 'uri' uri = URI.parse("http://my.example.com") uri.host = "foo.com" uri.to_s #=> "http://foo.com"
Extract the host part of the URI
and unwrap brackets for IPv6 addresses.
This method is the same as URI::Generic#host
except brackets for IPv6 (and future IP) addresses are removed.
uri = URI("http://[::1]/bar") uri.hostname #=> "::1" uri.host #=> "[::1]"
Sets the host part of the URI
as the argument with brackets for IPv6 addresses.
This method is the same as URI::Generic#host=
except the argument can be a bare IPv6 address.
uri = URI("http://foo/bar") uri.hostname = "::1" uri.to_s #=> "http://[::1]/bar"
If the argument seems to be an IPv6 address, it is wrapped with brackets.
str
String
to search
schemes
Patterns to apply to str
Attempts to parse and merge a set of URIs. If no block
given, then returns the result, else it calls block
for each element in result.
See also URI::Parser.make_regexp
.
str
String
to search
schemes
Patterns to apply to str
Attempts to parse and merge a set of URIs. If no block
given, then returns the result, else it calls block
for each element in result.
See also URI::Parser.make_regexp
.
Stores value
in database with key
as the index. value
is converted to YAML
before being stored.
Returns value
Returns true
if this process is stopped. This is only returned if the corresponding wait call had the Process::WUNTRACED flag set.
Returns the number of the signal that caused stat to stop (or nil
if self is not stopped).