From 607be1ffb0a001e4a2bf9cae2babd44b4d898d25 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 6 Sep 2012 16:13:47 +0200 Subject: Fixed post --- lib/algorithm.rb | 2 +- lib/opentox-client.rb | 1 + lib/opentox.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/algorithm.rb b/lib/algorithm.rb index 4986c40..0c633f2 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -8,7 +8,7 @@ module OpenTox # @param [optional,OpenTox::Task] waiting_task (can be a OpenTox::Subtask as well), progress is updated accordingly # @return [String] URI of new resource (dataset, model, ...) def run params=nil - post params, {:accept => 'text/uri-list'} + post params end end diff --git a/lib/opentox-client.rb b/lib/opentox-client.rb index 5f5a106..d08d07a 100644 --- a/lib/opentox-client.rb +++ b/lib/opentox-client.rb @@ -36,5 +36,6 @@ FALSE_REGEXP = /^(false|inactive|0|0.0|low tox|deactivating|non-carcinogen|non-m "compound.rb", "dataset.rb", "model.rb", + "algorithm.rb" ].each{ |f| require File.join(File.dirname(__FILE__),f) } diff --git a/lib/opentox.rb b/lib/opentox.rb index 80644db..faa7b58 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -95,9 +95,9 @@ module OpenTox end # Post object to webservice - def post service_uri, wait=true + def post params=nil, wait=true # TODO: RDFXML - uri = RestClientWrapper.post service_uri, to_ntriples, { :content_type => "text/plain", :subjectid => @subjectid} + uri = RestClientWrapper.post @uri.to_s, params, { :content_type => "text/plain", :subjectid => @subjectid} wait_for_task uri if wait end -- cgit v1.2.3