summaryrefslogtreecommitdiff
path: root/lib/model.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2010-01-19 10:02:09 +0100
committermr <mr@mrautenberg.de>2010-01-19 10:02:09 +0100
commit0e7f3c196b123acd9d311f02f09f8b03992cea5f (patch)
tree9991c400dc3f01e7c626ed64bd21be9f051e0cf0 /lib/model.rb
parent253e15cae162d88a269cc86608dd3334cab29cf9 (diff)
move authorization to branch test
Diffstat (limited to 'lib/model.rb')
-rw-r--r--lib/model.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/model.rb b/lib/model.rb
index 24f6e52..b86b3fc 100644
--- a/lib/model.rb
+++ b/lib/model.rb
@@ -34,7 +34,7 @@ module OpenTox
# Predict a compound
def predict(compound)
- RestClient.post(@uri, :compound_uri => compound.uri)
+ RestClient::Resource.new(@uri, :user => request.username, :password => request.password).post(:compound_uri => compound.uri)
end
def self.base_uri
@@ -42,7 +42,7 @@ module OpenTox
end
def self.create(data)
- RestClient.post(@@config[:services]["opentox-model"], data, :content_type => "application/x-yaml").to_s
+ RestClient::Resource.new(@@config[:services]["opentox-model"], :user => request.username, :password => request.password).post(data, :content_type => "application/x-yaml").to_s
end
def endpoint