summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-07-28 11:18:28 +0200
committerAndreas Maunz <andreas@maunz.de>2011-07-28 11:18:28 +0200
commitacd586185ace0cf7bfc477951fb06fce4c88f385 (patch)
treec38f9c29647e96eaa216076ae617b4cfefa3c969
parent4f98fc6c5733e4f2760f73c93f437b062d6a8695 (diff)
Added support for uri-list and sdf
-rw-r--r--application.rb6
1 files changed, 5 insertions, 1 deletions
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