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/model.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/model.rb') diff --git a/lib/model.rb b/lib/model.rb index b6cef46..db9efd4 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -86,8 +86,8 @@ module OpenTox def initialize @source = "http://github.com/helma/opentox-model" - @algorithm = File.join(@@config[:services]["opentox-algorithm"],"lazar") - #@independent_variables = File.join(@@config[:services]["opentox-algorithm"],"fminer#BBRC_representative") + @algorithm = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + #@independent_variables = File.join(CONFIG[:services]["opentox-algorithm"],"fminer#BBRC_representative") @features = [] @effects = {} @activities = {} @@ -97,12 +97,12 @@ module OpenTox def save @features.uniq! - resource = RestClient::Resource.new(@@config[:services]["opentox-model"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0]) + resource = RestClient::Resource.new(CONFIG[:services]["opentox-model"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0]) resource.post(self.to_yaml, :content_type => "application/x-yaml").chomp.to_s end def self.find_all - RestClientWrapper.get(@@config[:services]["opentox-model"]).chomp.split("\n") + RestClientWrapper.get(CONFIG[:services]["opentox-model"]).chomp.split("\n") end end end -- cgit v1.2.3 From 34a7b50fb278fc37c937f2fe170b86332eb054c5 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 22 Jul 2010 17:12:51 +0200 Subject: CONFIG reverted to @@config --- lib/model.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/model.rb') diff --git a/lib/model.rb b/lib/model.rb index db9efd4..b6cef46 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -86,8 +86,8 @@ module OpenTox def initialize @source = "http://github.com/helma/opentox-model" - @algorithm = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") - #@independent_variables = File.join(CONFIG[:services]["opentox-algorithm"],"fminer#BBRC_representative") + @algorithm = File.join(@@config[:services]["opentox-algorithm"],"lazar") + #@independent_variables = File.join(@@config[:services]["opentox-algorithm"],"fminer#BBRC_representative") @features = [] @effects = {} @activities = {} @@ -97,12 +97,12 @@ module OpenTox def save @features.uniq! - resource = RestClient::Resource.new(CONFIG[:services]["opentox-model"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0]) + resource = RestClient::Resource.new(@@config[:services]["opentox-model"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0]) resource.post(self.to_yaml, :content_type => "application/x-yaml").chomp.to_s end def self.find_all - RestClientWrapper.get(CONFIG[:services]["opentox-model"]).chomp.split("\n") + RestClientWrapper.get(@@config[:services]["opentox-model"]).chomp.split("\n") end end end -- cgit v1.2.3