lib/task.rb in opentox-ruby-2.1.0 vs lib/task.rb in opentox-ruby-3.0.0
- old
+ new
@@ -180,11 +180,11 @@
def error?
@metadata[OT.hasStatus] == 'Error'
end
def load_metadata
- if (CONFIG[:yaml_hosts].include?(URI.parse(@uri).host))
+ if (CONFIG[:json_hosts].include?(URI.parse(@uri).host))
result = RestClientWrapper.get(@uri, {:accept => 'application/x-yaml'}, nil, false)
@metadata = YAML.load result.to_s
@http_code = result.code
else
@metadata = Parser::Owl::Generic.new(@uri).load_metadata
@@ -207,10 +207,10 @@
return task
end
def reload( accept_header=nil )
unless accept_header
- if (CONFIG[:yaml_hosts].include?(URI.parse(uri).host))
+ if (CONFIG[:json_hosts].include?(URI.parse(uri).host))
accept_header = "application/x-yaml"
else
accept_header = 'application/rdf+xml'
end
end