[BioRuby-cvs] bioruby/lib/bio/appl pts1.rb,1.1,1.2

Mitsuteru C. Nakao nakao at dev.open-bio.org
Tue May 9 08:18:51 UTC 2006


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

Modified Files:
	pts1.rb 
Log Message:
* Uses Bio::Command::NetTools.post_form in PTS1#exec method instaed of 
  Net::HTTP.post_form.



Index: pts1.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/pts1.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pts1.rb	2 May 2006 10:29:19 -0000	1.1
--- pts1.rb	9 May 2006 08:18:49 -0000	1.2
***************
*** 147,167 ****
      seq = set_sequence_in_fastaformat(query)
      
!     @form_data = {'function' => @function.values,
                    'sequence' => seq.seq,
                    'name'     => seq.definition }
      @uri = URI.parse(["http:/", @host, @cgi_path].join('/'))
  
!     result = nil
! 
!     # The server cannot understand a POST request by folowing codes, but 
!     # request by the Net::HTTP.post_form method is OK.
!     #
!     #    Bio::Command::NetTools.net_http_start(@uri.host) {|http|
!     #      result, = http.post(@uri.path, @form_data)
!     #      @output = Report.new(result.body)
!     #    }
!     #
! 
!     result, = Net::HTTP.post_form(@uri, @form_data)
      @output = Report.new(result.body)
      
--- 147,156 ----
      seq = set_sequence_in_fastaformat(query)
      
!     @form_data = {'function' => @function.values.to_s,
                    'sequence' => seq.seq,
                    'name'     => seq.definition }
      @uri = URI.parse(["http:/", @host, @cgi_path].join('/'))
  
!     result, = Bio::Command::NetTools.post_form(@uri, @form_data)
      @output = Report.new(result.body)
      




More information about the bioruby-cvs mailing list