[BioRuby-cvs] bioruby/lib/bio command.rb,1.13,1.14

Katayama Toshiaki k at dev.open-bio.org
Wed Mar 28 12:31:05 UTC 2007


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

Modified Files:
	command.rb 
Log Message:
* keys and parameters of params are forced to to_s
* post_form is modified to accept url in string


Index: command.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/command.rb,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** command.rb	26 Mar 2007 17:09:45 -0000	1.13
--- command.rb	28 Mar 2007 12:31:03 -0000	1.14
***************
*** 273,278 ****
    #
    def post_form(uri, params, header = {})
      data = params.map do |key, val|
!       "#{URI.escape(key)}=#{URI.escape(val)}" 
      end.join('&')
      h = {
--- 273,281 ----
    #
    def post_form(uri, params, header = {})
+     unless uri.is_a?(URI)
+       uri = URI.parse(uri)
+     end
      data = params.map do |key, val|
!       "#{URI.escape(key.to_s)}=#{URI.escape(val.to_s)}" 
      end.join('&')
      h = {




More information about the bioruby-cvs mailing list