From 05084b1127f0d2498240472cca8a475f48f1fcc4 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 22 Jul 2010 10:23:53 +0200 Subject: modifications from first code review meeting --- lib/compound.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/compound.rb') diff --git a/lib/compound.rb b/lib/compound.rb index a293df0..45b96b8 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -11,19 +11,19 @@ module OpenTox def initialize(params) if params[:smiles] @inchi = smiles2inchi(params[:smiles]) - @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) + @uri = File.join(CONFIG[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:inchi] @inchi = params[:inchi] - @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) + @uri = File.join(CONFIG[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:sdf] @inchi = sdf2inchi(params[:sdf]) - @uri = File.join(@@config[:services]["opentox-compound"],URI.escape(@inchi)) + @uri = File.join(CONFIG[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:name] # paranoid URI encoding to keep SMILES charges and brackets @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)) + @uri = File.join(CONFIG[:services]["opentox-compound"],URI.escape(@inchi)) elsif params[:uri] @uri = params[:uri] case params[:uri] -- cgit v1.2.3