diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-04-26 16:04:05 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-04-26 16:04:05 +0200 |
commit | f8b6f8d19566d372e47edba7968ce66ff09052c9 (patch) | |
tree | 507b4ffe74bf63bbe8664aac2b3c57efae8717ab /lib | |
parent | b01dce14f765875d7c75edb545323b444fa2b140 (diff) |
tests removed, URI.accessible? check temporarily removed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/opentox.rb | 1 | ||||
-rw-r--r-- | lib/rest-client-wrapper.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index 187eb08..6ce439d 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -111,6 +111,7 @@ module OpenTox end def create service_uri, subjectid=nil + #uri = uri(SecureRandom.uuid) uri = RestClientWrapper.post(service_uri, {}, {:accept => 'text/uri-list', :subjectid => subjectid}) URI.task?(service_uri) ? from_uri(uri, subjectid, false) : from_uri(uri, subjectid) end diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb index 479d5a5..3071432 100644 --- a/lib/rest-client-wrapper.rb +++ b/lib/rest-client-wrapper.rb @@ -18,7 +18,8 @@ module OpenTox # check input @subjectid = headers[:subjectid] ? headers[:subjectid] : nil bad_request_error "Invalid URI: '#{uri}'" unless URI.valid? uri - not_found_error "URI '#{uri}' not found." unless URI.accessible?(uri, @subjectid) unless URI.ssl?(uri) + #TODO fix for internal installations + #not_found_error "URI '#{uri}' not found." unless URI.accessible?(uri, @subjectid) unless URI.ssl?(uri) bad_request_error "Headers are not a hash: #{headers.inspect}" unless headers==nil or headers.is_a?(Hash) # make sure that no header parameters are set in the payload [:accept,:content_type,:subjectid].each do |header| |