diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-07-22 10:23:53 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-07-22 10:23:53 +0200 |
commit | 05084b1127f0d2498240472cca8a475f48f1fcc4 (patch) | |
tree | b88fcae0617a5acacf5cc17db83665688c0f2078 /lib/compound.rb | |
parent | ef22b5b8581a535aa14c977c124f590e9a76bac5 (diff) |
modifications from first code review meeting
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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] |