[BioRuby-cvs] bioruby/lib/bio command.rb,1.6,1.7
Naohisa Goto
ngoto at dev.open-bio.org
Thu Apr 27 02:33:45 UTC 2006
Update of /home/repository/bioruby/bioruby/lib/bio
In directory dev.open-bio.org:/tmp/cvs-serv2217/lib/bio
Modified Files:
command.rb
Log Message:
changed spec of Bio::Command::NetTools.net_http_start()
Index: command.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/command.rb,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** command.rb 26 Apr 2006 12:04:13 -0000 1.6
--- command.rb 27 Apr 2006 02:33:43 -0000 1.7
***************
*** 165,180 ****
# Same as:
! # uri = URI.parse(uri); Net::HTTP.start(uri.host, uri.port)
# and
# it uses proxy if an environment variable (same as OpenURI.open_uri)
# is set.
! # uri must be a string or a URI object.
! def self.net_http_start(uri, &block)
! unless uri.kind_of?(URI::Generic)
! uri = URI.parse(uri)
! end
! if uri.scheme != 'http' then
! raise "only http is supported: #{uri.inspect}"
! end
# Note: URI#find_proxy is an unofficial method defined in open-uri.rb.
# If the spec of open-uri.rb would be changed, we should change below.
--- 165,175 ----
# Same as:
! # Net::HTTP.start(address, port)
# and
# it uses proxy if an environment variable (same as OpenURI.open_uri)
# is set.
! #
! def self.net_http_start(address, port = 80, &block)
! uri = URI.parse("http://#{address}:#{port}")
# Note: URI#find_proxy is an unofficial method defined in open-uri.rb.
# If the spec of open-uri.rb would be changed, we should change below.
***************
*** 185,189 ****
http = Net::HTTP
end
! http.start(uri.host, uri.port, &block)
end
end #module NetTools
--- 180,184 ----
http = Net::HTTP
end
! http.start(address, port, &block)
end
end #module NetTools
More information about the bioruby-cvs
mailing list