diff options
-rwxr-xr-x | application.rb | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/application.rb b/application.rb index 2fd17a7..8c8a83d 100755 --- a/application.rb +++ b/application.rb @@ -1,14 +1,12 @@ require 'rubygems' -gem "opentox-ruby-api-wrapper", "= 1.5.7" +gem "opentox-ruby-api-wrapper", "= 1.6.1" require 'opentox-ruby-api-wrapper' -LOGGER.progname = File.expand_path(__FILE__) - class Dataset include DataMapper::Resource property :id, Serial property :uri, String, :length => 255 - property :file, String, :length => 255 + #property :file, String, :length => 255 property :yaml, Text, :length => 2**32-1 property :owl, Text, :length => 2**32-1 property :created_at, DateTime @@ -128,8 +126,8 @@ post '/?' do case request.content_type when /yaml/ dataset.yaml = request.env["rack.input"].read - when /csv/ - dataset.yaml = csv2yaml request.env["rack.input"].read +# when /csv/ +# dataset.yaml = csv2yaml request.env["rack.input"].read when "application/rdf+xml" dataset.yaml = OpenTox::Dataset.owl_to_yaml(request.env["rack.input"].read,dataset.uri) else @@ -161,17 +159,6 @@ delete '/:id/?' do end delete '/?' do - -=begin - Dataset.all.each do |d| - begin - File.delete d.file - rescue - LOGGER.error "Cannot delete dataset file '#{d.file}'" - end - #d.destroy! - end -=end Dataset.auto_migrate! response['Content-Type'] = 'text/plain' "All datasets deleted." |