summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-08-18 17:52:52 +0200
committerChristoph Helma <helma@in-silico.ch>2010-08-18 17:52:52 +0200
commit010cf0268bb8c9b5a051b5a370e0d6f23d6796b7 (patch)
treebef0e498496c7b16998bbda21336c10c8364bcbc
parent6e02e9ff6d9c11defae77dda533fc71518bd5b2c (diff)
obsolete rakefiles removed
-rw-r--r--Rakefile10
-rwxr-xr-xapplication.rb7
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 7494748..f75ad73 100755
--- a/application.rb
+++ b/application.rb
@@ -6,7 +6,6 @@ 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
@@ -58,7 +57,7 @@ get '/:id' do
raise e.message + e.backtrace
halt 404, "Dataset #{params[:id]} not found."
end
- halt 404, "Dataset #{params[:id]} not found." if dataset.nil? # not sure how an empty cataset can be returned, but if this happens stale processes keep runing at 100% cpo
+ halt 404, "Dataset #{params[:id]} not found." if dataset.nil? # not sure how an empty cataset can be returned, but if this happens stale processes keep runing at 100% cpu
case accept
when /rdf/ # redland sends text/rdf instead of application/rdf+xml
response['Content-Type'] = 'application/rdf+xml'
@@ -126,16 +125,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