diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-25 13:52:43 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-25 13:52:43 +0200 |
commit | b5cf8f9b80303696688144d81a61db758ae8fe9f (patch) | |
tree | 74e5b7669db84dd7e1c5e3660553828dfbf68066 | |
parent | d012b9e8da641c342c455a1384ddf3b14f5b5c35 (diff) | |
parent | d5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (diff) |
Merge branch 'development' into svm_matrix
-rw-r--r-- | lib/helper.rb | 3 | ||||
-rw-r--r-- | lib/rest_client_wrapper.rb | 2 | ||||
-rw-r--r-- | lib/task.rb | 3 | ||||
-rw-r--r-- | opentox-ruby.gemspec | 36 |
4 files changed, 36 insertions, 8 deletions
diff --git a/lib/helper.rb b/lib/helper.rb index 3a6126a..995f3e9 100644 --- a/lib/helper.rb +++ b/lib/helper.rb @@ -44,8 +44,9 @@ helpers do def uri_available?(urlStr) url = URI.parse(urlStr) + subjectidstr = @subjectid ? "?subjectid=#{CGI.escape @subjectid}" : "" Net::HTTP.start(url.host, url.port) do |http| - return http.head("#{url.request_uri}?subjectid=#{CGI.escape @subjectid}").code == "200" + return http.head("#{url.request_uri}#{subjectidstr}").code == "200" end end diff --git a/lib/rest_client_wrapper.rb b/lib/rest_client_wrapper.rb index 747a353..53887a2 100644 --- a/lib/rest_client_wrapper.rb +++ b/lib/rest_client_wrapper.rb @@ -131,7 +131,7 @@ module OpenTox raise "unknown content-type for task : '"+res.content_type.to_s+"'"+" base-uri: "+base_uri.to_s+" content: "+res[0..200].to_s end - LOGGER.debug "result is a task '"+task.uri.to_s+"', wait for completion" + #LOGGER.debug "result is a task '"+task.uri.to_s+"', wait for completion" task.wait_for_completion waiting_task unless task.completed? # maybe task was cancelled / error if task.errorReport diff --git a/lib/task.rb b/lib/task.rb index 42d3d17..146a756 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -288,7 +288,8 @@ module OpenTox if @http_code == 202 raise "#{@uri}: illegal task state, code is 202, but hasStatus is not Running: '"+@metadata[OT.hasStatus]+"'" unless running? elsif @http_code == 201 - raise "#{@uri}: illegal task state, code is 201, but hasStatus is not Completed: '"+@metadata[OT.hasStatus]+"'" unless completed? + # ignore hasStatus + # raise "#{@uri}: illegal task state, code is 201, but hasStatus is not Completed: '"+@metadata[OT.hasStatus]+"'" unless completed? raise "#{@uri}: illegal task state, code is 201, resultURI is no task-URI: '"+@metadata[OT.resultURI].to_s+ "'" unless @metadata[OT.resultURI] and @metadata[OT.resultURI].to_s.uri? end diff --git a/opentox-ruby.gemspec b/opentox-ruby.gemspec index 289dacd..e62eec5 100644 --- a/opentox-ruby.gemspec +++ b/opentox-ruby.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{opentox-ruby} - s.version = "1.0.2" + s.version = "2.0.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Christoph Helma, Martin Guetlein, Andreas Maunz, Micha Rautenberg, David Vorgrimmler"] - s.date = %q{2011-03-16} + s.date = %q{2011-05-23} s.description = %q{Ruby wrapper for the OpenTox REST API (http://www.opentox.org)} s.email = %q{helma@in-silico.ch} s.executables = ["opentox-install-debian.sh", "opentox-install-ubuntu.sh"] @@ -34,7 +34,7 @@ Gem::Specification.new do |s| "lib/feature.rb", "lib/helper.rb", "lib/model.rb", - "lib/ontology_service.rb", + "lib/ontology.rb", "lib/opentox-ruby.rb", "lib/opentox.owl", "lib/opentox.rb", @@ -45,7 +45,6 @@ Gem::Specification.new do |s| "lib/serializer.rb", "lib/spork.rb", "lib/task.rb", - "lib/templates/config.yaml", "lib/templates/default_guest_policy.xml", "lib/templates/default_policy.xml", "lib/to-html.rb", @@ -53,7 +52,7 @@ Gem::Specification.new do |s| ] s.homepage = %q{http://github.com/helma/opentox-ruby} s.require_paths = ["lib"] - s.rubygems_version = %q{1.4.2} + s.rubygems_version = %q{1.5.2} s.summary = %q{Ruby wrapper for the OpenTox REST API} if s.respond_to? :specification_version then @@ -77,9 +76,18 @@ Gem::Specification.new do |s| s.add_runtime_dependency(%q<tmail>, [">= 0"]) s.add_runtime_dependency(%q<rinruby>, [">= 0"]) s.add_runtime_dependency(%q<ohm>, [">= 0"]) + s.add_runtime_dependency(%q<ohm-contrib>, [">= 0"]) s.add_runtime_dependency(%q<SystemTimer>, [">= 0"]) s.add_runtime_dependency(%q<rjb>, [">= 0"]) + s.add_runtime_dependency(%q<dm-core>, [">= 0"]) + s.add_runtime_dependency(%q<dm-serializer>, [">= 0"]) + s.add_runtime_dependency(%q<dm-timestamps>, [">= 0"]) + s.add_runtime_dependency(%q<dm-types>, [">= 0"]) + s.add_runtime_dependency(%q<dm-migrations>, [">= 0"]) + s.add_runtime_dependency(%q<dm-validations>, [">= 0"]) + s.add_runtime_dependency(%q<dm-sqlite-adapter>, [">= 0"]) s.add_runtime_dependency(%q<haml>, [">= 3"]) + s.add_runtime_dependency(%q<ruby-plot>, ["~> 0.4.0"]) s.add_development_dependency(%q<jeweler>, [">= 0"]) else s.add_dependency(%q<sinatra>, [">= 0"]) @@ -99,9 +107,18 @@ Gem::Specification.new do |s| s.add_dependency(%q<tmail>, [">= 0"]) s.add_dependency(%q<rinruby>, [">= 0"]) s.add_dependency(%q<ohm>, [">= 0"]) + s.add_dependency(%q<ohm-contrib>, [">= 0"]) s.add_dependency(%q<SystemTimer>, [">= 0"]) s.add_dependency(%q<rjb>, [">= 0"]) + s.add_dependency(%q<dm-core>, [">= 0"]) + s.add_dependency(%q<dm-serializer>, [">= 0"]) + s.add_dependency(%q<dm-timestamps>, [">= 0"]) + s.add_dependency(%q<dm-types>, [">= 0"]) + s.add_dependency(%q<dm-migrations>, [">= 0"]) + s.add_dependency(%q<dm-validations>, [">= 0"]) + s.add_dependency(%q<dm-sqlite-adapter>, [">= 0"]) s.add_dependency(%q<haml>, [">= 3"]) + s.add_dependency(%q<ruby-plot>, ["~> 0.4.0"]) s.add_dependency(%q<jeweler>, [">= 0"]) end else @@ -122,9 +139,18 @@ Gem::Specification.new do |s| s.add_dependency(%q<tmail>, [">= 0"]) s.add_dependency(%q<rinruby>, [">= 0"]) s.add_dependency(%q<ohm>, [">= 0"]) + s.add_dependency(%q<ohm-contrib>, [">= 0"]) s.add_dependency(%q<SystemTimer>, [">= 0"]) s.add_dependency(%q<rjb>, [">= 0"]) + s.add_dependency(%q<dm-core>, [">= 0"]) + s.add_dependency(%q<dm-serializer>, [">= 0"]) + s.add_dependency(%q<dm-timestamps>, [">= 0"]) + s.add_dependency(%q<dm-types>, [">= 0"]) + s.add_dependency(%q<dm-migrations>, [">= 0"]) + s.add_dependency(%q<dm-validations>, [">= 0"]) + s.add_dependency(%q<dm-sqlite-adapter>, [">= 0"]) s.add_dependency(%q<haml>, [">= 3"]) + s.add_dependency(%q<ruby-plot>, ["~> 0.4.0"]) s.add_dependency(%q<jeweler>, [">= 0"]) end end |