summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-09-06 16:13:47 +0200
committerAndreas Maunz <andreas@maunz.de>2012-09-06 16:13:47 +0200
commit607be1ffb0a001e4a2bf9cae2babd44b4d898d25 (patch)
tree03ddbeffd29284531777f1a61d679ce28d3b4c57
parentd1645d959ab2b0701ff6bd616d44ca7aaeaf0eca (diff)
Fixed post
-rw-r--r--Gemfile.lock8
-rw-r--r--lib/algorithm.rb2
-rw-r--r--lib/opentox-client.rb1
-rw-r--r--lib/opentox.rb4
4 files changed, 8 insertions, 7 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 085e974..345faf2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- opentox-client (1.0.0)
+ opentox-client (1.0.0pre1)
bundler
open4
rdf
@@ -12,11 +12,11 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- addressable (2.2.8)
- ffi (1.0.11)
+ addressable (2.3.2)
+ ffi (1.1.5)
mime-types (1.19)
open4 (1.3.0)
- rdf (0.3.7)
+ rdf (0.3.8)
addressable (>= 2.2.6)
rdf-n3 (0.3.7)
rdf (>= 0.3.4)
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