Override to display a longer description of what this command does.
Invoke the command with the given list of arguments.
True if the backtrace option has been specified, or debug is on.
Writes out this config file, replacing its source.
Generates a !
line for bin_file_name
‘s wrapper copying arguments if necessary.
If the :custom_shebang config is set, then it is used as a template for how to create the shebang used for to run a gem’s executables.
The template supports 4 expansions:
$env the path to the unix env utility $ruby the path to the currently running ruby interpreter $exec the path to the gem's executable $name the name of the gem the executable is for
Creates a new package that will read or write to the file gem
.
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
Initialization tasks without the “yield self” or define operations.
Create the Rake tasks and actions specified by this Gem::PackageTask
. (define
is automatically called if a block is given to new
).
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.
Creates server sockets based on the addresses option. If no addresses were given a server socket for all interfaces is created.
Returns the first source in the list.
Returns true if this source list includes other
which may be a Gem::Source
or a source URI
.
Sets the bindir entry in RbConfig::CONFIG to value
and restores the original value when the block ends
Finds the path to the Ruby executable
Prints a formatted backtrace to the errors stream if backtraces are enabled.
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.