diff options
-rw-r--r-- | Rakefile | 10 | ||||
-rwxr-xr-x | application.rb | 7 |
2 files changed, 1 insertions, 16 deletions
diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 21e8bdf..0000000 --- a/Rakefile +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -require 'rake' -require 'tasks/opentox' - -@gems = "sinatra emk-sinatra-url-for opentox-ruby-api-wrapper" - -desc "Run local tests" -task :test do - load 'test/test.rb' -end diff --git a/application.rb b/application.rb index fea6755..2ace1db 100755 --- a/application.rb +++ b/application.rb @@ -1,12 +1,11 @@ require 'rubygems' -gem "opentox-ruby-api-wrapper", "= 1.6.2" +gem "opentox-ruby-api-wrapper", "= 1.6.6" require 'opentox-ruby-api-wrapper' class Dataset include DataMapper::Resource property :id, Serial property :uri, 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 @@ -151,16 +150,12 @@ 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 "application/rdf+xml" dataset.yaml = OpenTox::Dataset.owl_to_yaml(request.env["rack.input"].read,dataset.uri) else halt 404, "MIME type \"#{request.content_type}\" not supported." end begin - #dataset.owl = d.rdf - #dataset.uri = uri raise "saving failed: "+dataset.errors.inspect unless dataset.save rescue => e LOGGER.error e.message |