Downloads spec
and writes it to dir
. See also Gem::RemoteFetcher#download
.
Default fetcher instance. Use this instead of ::new
to reduce object allocation.
Loads Ruby format gemspec from file
.
Load custom marshal format, re-initializing defaults as needed
Recursively walk dependencies of this spec, executing the block
for each hop.
Set
the version to version
, potentially also setting required_rubygems_version
if version
indicates it is a prerelease.
Display an informational alert. Will ask question
if it is not nil.
def sort(*filenames) Sort.new(self, *filenames) end
Returns a Glob
filter object, with the given pattern
object
returns the parser to be used.
Unless a URI::Parser
is defined, then DEFAULT_PARSER is used.
Sets userinfo, argument is string like ‘name:pass’
v
String
public setter for the user
component. (with validation)
see also URI::Generic.check_user
require 'uri' uri = URI.parse("http://john:S3nsit1ve@my.example.com") uri.user = "sam" # => "sam" uri #=> #<URI::HTTP:0x00000000881d90 URL:http://sam:V3ry_S3nsit1ve@my.example.com>
returns the userinfo, either as ‘user’ or ‘user:password’
returns the user component
v
String
public setter for the query component v
.
require 'uri' uri = URI.parse("http://my.example.com/?id=25") uri.query = "id=1" # => "id=1" uri #=> #<URI::HTTP:0x000000008e89e8 URL:http://my.example.com/?id=1>
Checks if URI
has a path
v
URI
or String
attempt to parse other URI +oth+ return [parsed_oth, self]
require 'uri' uri = URI.parse("http://my.example.com") uri.coerce("http://foo.com") #=> [#<URI::HTTP:0x00000000bcb028 URL:http://foo.com/>, #<URI::HTTP:0x00000000d92178 URL:http://my.example.com>]
returns filter.
setter for filter val
setter for headers v
Services the request req
which will fill in the response res
. See WEBrick::HTTPServlet::AbstractServlet#service
for details.