From d5eea102ff343804dde1ccd254bc570596341a89 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 21 May 2010 15:55:17 +0200 Subject: dynamic From: address from mailer --- lib/compound.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/compound.rb') diff --git a/lib/compound.rb b/lib/compound.rb index cc29fc5..6ab78e0 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -18,7 +18,9 @@ module OpenTox @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:name] # paranoid URI encoding to keep SMILES charges and brackets - @inchi = RestClientWrapper.get("#{@@cactus_uri}#{URI.encode(params[:name], Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}/stdinchi").chomp + @inchi = RestClient.get("#{@@cactus_uri}#{URI.encode(params[:name], Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}/stdinchi").body.chomp + # this was too hard for me to debug and leads to additional errors (ch) + #@inchi = RestClientWrapper.get("#{@@cactus_uri}#{URI.encode(params[:name], Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}/stdinchi").chomp @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:uri] @uri = params[:uri] -- cgit v1.2.3