[BioRuby-cvs] bioruby/lib/bio/db fantom.rb,1.12,1.13

Naohisa Goto ngoto at dev.open-bio.org
Fri Jul 14 14:48:58 UTC 2006


Update of /home/repository/bioruby/bioruby/lib/bio/db
In directory dev.open-bio.org:/tmp/cvs-serv5517/lib/bio/db

Modified Files:
	fantom.rb 
Log Message:
* Changed to use Bio::Command.new_http instead of Net::HTTP.new.
* Changed to use Bio::Command.start_http instead of Net::HTTP.start.


Index: fantom.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/fantom.rb,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** fantom.rb	30 Apr 2006 05:57:40 -0000	1.12
--- fantom.rb	14 Jul 2006 14:48:55 -0000	1.13
***************
*** 16,19 ****
--- 16,20 ----
  
  require 'bio/db'
+ require 'bio/command'
  #require 'bio/sequence'
  
***************
*** 33,41 ****
        port = 80
        path = "/db/maxml/maxmlseq.cgi?masterid=#{URI.escape(idstr.to_s)}&style=xml"
-       proxy = URI.parse(http_proxy.to_s)
        xml = ''
!       Net::HTTP.start(addr, port, proxy.host, proxy.port) do |http|
!         response, = http.get(path)
!         xml = response.body
        end
        xml
--- 34,49 ----
        port = 80
        path = "/db/maxml/maxmlseq.cgi?masterid=#{URI.escape(idstr.to_s)}&style=xml"
        xml = ''
!       if http_proxy then
!         proxy = URI.parse(http_proxy.to_s)
!         Net::HTTP.start(addr, port, proxy.host, proxy.port) do |http|
!           response, = http.get(path)
!           xml = response.body
!         end
!       else
!         Bio::Command.start_http(addr, port) do |http|
!           response, = http.get(path)
!           xml = response.body
!         end
        end
        xml




More information about the bioruby-cvs mailing list