From acd586185ace0cf7bfc477951fb06fce4c88f385 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 28 Jul 2011 11:18:28 +0200 Subject: Added support for uri-list and sdf --- application.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application.rb b/application.rb index c64d5ce..cdbaef2 100644 --- a/application.rb +++ b/application.rb @@ -168,10 +168,14 @@ get '/:id' do response['Content-Type'] = 'application/ms-excel' File.open(file).read - when /chemical\/x-mdl-sdfile/ + when /sdfile/ response['Content-Type'] = 'chemical/x-mdl-sdfile' YAML.load_file(@yaml_file).to_sdf + when /uri-list/ + response['Content-Type'] = 'text/uri-list' + YAML.load_file(@yaml_file).to_urilist + else raise OpenTox::NotFoundError.new "Content-type #{@accept} not supported." end -- cgit v1.2.3