diff options
author | Christoph Helma <ch@toxbank-ch.in-silico.ch> | 2012-02-15 17:20:24 +0000 |
---|---|---|
committer | Christoph Helma <ch@toxbank-ch.in-silico.ch> | 2012-02-15 17:20:24 +0000 |
commit | 7ba9df992e8a0db4f3ff79754e48118e7dba1e0b (patch) | |
tree | c9bd8ec8d29e8662231266741e405b306108318d /lib/task.rb | |
parent | 76e2c84c766fd37d702c45e76dc666230afcd136 (diff) | |
parent | 9ed209b262e0b540af967e24e9b9845600a0669c (diff) |
Merge branch 'development' of github.com:opentox/opentox-client into development
Conflicts:
lib/spork.rb
lib/task.rb
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/task.rb b/lib/task.rb index cd5aa79..aee6c62 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -5,7 +5,7 @@ module OpenTox # Class for handling asynchronous tasks class Task - def self.create service_uri, params + def self.create service_uri, params={} task = Task.new RestClient.post(service_uri,params).chomp pid = Spork.spork { yield } task.pid = pid @@ -45,10 +45,10 @@ module OpenTox when /=/ res = RestClient.put(File.join(@uri,method.sub(/=/,'')),{}) super unless res.code == 200 - when /?/ + when /\?/ return metadata[RDF::OT.hasStatus] == method.sub(/\?/,'').capitalize else - return metadata[RDF::OT[method]] + return metadata[RDF::OT[method]].to_s end rescue super |