Returns the authority for an HTTP
uri, as defined in www.rfc-editor.org/rfc/rfc3986#section-3.2.
Example:
URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com" URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000" URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com"
Returns the origin for an HTTP
uri, as defined in www.rfc-editor.org/rfc/rfc6454.
Example:
URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com" URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000" URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com" URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com"
This is used as a predicate, and ought to be called first.
Returns the value of the node as an IntegerNode or a FloatNode. This method is deprecated in favor of value
or numerator/#denominator.
Returns true if this comment happens on the same line as other code and false if the comment is by itself.
This can only be true for inline comments.
Look up the typeclass
DNS
resource of name
.
name
must be a Resolv::DNS::Name
or a String
.
typeclass
should be one of the following:
Resolv::DNS::Resource::IN::ANY
Resolv::DNS::Resource::IN::CNAME
Resolv::DNS::Resource::IN::HINFO
Resolv::DNS::Resource::IN::MINFO
Resolv::DNS::Resource::IN::MX
Resolv::DNS::Resource::IN::NS
Resolv::DNS::Resource::IN::PTR
Resolv::DNS::Resource::IN::SOA
Resolv::DNS::Resource::IN::TXT
Returned resource is represented as a Resolv::DNS::Resource
instance, i.e. Resolv::DNS::Resource::IN::A
.
Looks up all typeclass
DNS
resources for name
. See getresource
for argument details.
Whether this specification is stubbed - i.e. we have information about the gem from a stub line, without having to evaluate the entire gemspec file.
Return the authoritative instance of the command manager.
Returns self. Allows a CommandManager
instance to stand in for the class itself.
True if the backtrace option has been specified, or debug is on.
Writes out this config file, replacing its source.
Installs the gem dep_or_name
and all its dependencies. Returns an Array
of installed gem specifications.
If the :prerelease
option is set and there is a prerelease for dep_or_name
the prerelease version will be installed.
Unless explicitly specified as a prerelease dependency, prerelease gems that dep_or_name
depend on will not be installed.
If c-1.a depends on b-1 and a-1.a and there is a gem b-1.a available then c-1.a, b-1 and a-1.a will be installed. b-1.a will need to be installed separately.
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 Gem::Net::HTTP request of type request_class
on uri
returning a Gem::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.