Loads the default specifications. It should be called only once.
Return a list of all gems that have a dependency on this gemspec. The list is structured with entries that conform to:
[depending_gem, dependency, [list_of_gems_that_satisfy_dependency]]
List of dependencies that are used for development
Sets the rubygems_version
to the current RubyGems version.
Checks to see if the files to be packaged are world-readable.
Is this dependency simply asking for the latest version of a gem?
Returns true if net/http is in version 1.2 mode. Defaults to true.
Gets the body text from the target and outputs it to $stdout. The target can either be specified as (uri
), or as (host
, path
, port
= 80); so:
Net::HTTP.get_print URI('http://www.example.com/index.html')
or:
Net::HTTP.get_print 'www.example.com', '/index.html'
Sends a GET request to the target and returns the HTTP
response as a Net::HTTPResponse
object. The target can either be specified as (uri
), or as (host
, path
, port
= 80); so:
res = Net::HTTP.get_response(URI('http://www.example.com/index.html')) print res.body
or:
res = Net::HTTP.get_response('www.example.com', '/index.html') print res.body
The username of the proxy server, if one is configured.
Sends a GET request to the path
. Returns the response as a Net::HTTPResponse
object.
When called with a block, passes an HTTPResponse
object to the block. The body of the response will not have been read yet; the block can process it using HTTPResponse#read_body
, if desired.
Returns the response.
This method never raises Net::* exceptions.
response = http.request_get('/index.html') # The entity body is already read in this case. p response['content-type'] puts response.body # Using a block http.request_get('/index.html') {|response| p response['content-type'] response.read_body do |str| # read body now print str end }