A set of tasks to prepare the file in order to parse it
Turns on net/http 1.2 (Ruby 1.8) features. Defaults to ON in Ruby 1.8 or later.
Creates a new Net::HTTP
object, then additionally opens the TCP connection and HTTP
session.
Arguments are the following:
hostname or IP address of the server
port of the server
address of proxy
port of proxy
user of proxy
pass of proxy
optional hash
opt sets following values by its accessor. The keys are ipaddr, ca_file
, ca_path
, cert, cert_store
, ciphers, keep_alive_timeout
, close_on_empty_response
, key, open_timeout
, read_timeout
, write_timeout
, ssl_timeout
, ssl_version
, use_ssl, verify_callback
, verify_depth
and verify_mode. If you set :use_ssl as true, you can use https and default value of verify_mode
is set as OpenSSL::SSL::VERIFY_PEER.
If the optional block is given, the newly created Net::HTTP
object is passed to it and closed when the block finishes. In this case, the return value of this method is the return value of the block. If no block is given, the return value of this method is the newly created Net::HTTP
object itself, and the caller is responsible for closing it upon completion using the finish() method.
Returns true if the HTTP
session has been started.
Opens a TCP connection and HTTP
session.
When this method is called with a block, it passes the Net::HTTP
object to the block, and closes the TCP connection and HTTP
session after the block has been executed.
When called with a block, it returns the return value of the block; otherwise, it returns self.
Sets the resolver timeouts. This may be a single positive number or an array of positive numbers representing timeouts in seconds. If an array is specified, a DNS
request will retry and wait for each successive interval in the array until a successful response is received. Specifying nil
reverts to the default timeouts:
Example:
dns.timeouts = 3
Registers for notifications of event ev
on the proxied TupleSpace
. See TupleSpace#notify
Called by TupleSpace
to notify this NotifyTemplateEntry
of a new event.
Registers for notifications of event
. Returns a NotifyTemplateEntry
. See NotifyTemplateEntry
for examples of how to listen for notifications.
event
can be:
A tuple was added
A tuple was taken or moved
A tuple was lost after being overwritten or expiring
The TupleSpace
will also notify you of the ‘close’ event when the NotifyTemplateEntry
has expired.
True when the gem has been activated
Version of the gem
Create on demand parser.
The Requirement of the unresolved dependency (not Version).
Ensure path
and path with extension
are identical.
Parse obj
, returning an [op, version]
pair. obj
can be a String
or a Gem::Version
.
If obj
is a String
, it can be either a full requirement specification, like ">= 1.2"
, or a simple version number, like "1.2"
.
parse("> 1.0") # => [">", Gem::Version.new("1.0")] parse("1.0") # => ["=", Gem::Version.new("1.0")] parse(Gem::Version.new("1.0")) # => ["=, Gem::Version.new("1.0")]