summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2010-08-23 14:06:17 +0200
committermr <mr@mrautenberg.de>2010-08-23 14:06:17 +0200
commitcb3fc6a27be73c9f8c08c31f555f181c43b50bb2 (patch)
tree1d0f583086be74b190ec11a1aff94b5a43a1a152 /application.rb
parent3de9e162beeb5f88d68505b560bc4dea7737e5f8 (diff)
parent0f47a05adb11fbd9dfd0977780d2daa1e434c7c8 (diff)
Merge remote branch 'helma/master' into development
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/application.rb b/application.rb
index d1ff70e..0f762eb 100644
--- a/application.rb
+++ b/application.rb
@@ -1,7 +1,6 @@
require 'rubygems'
-gem "opentox-ruby-api-wrapper", "= 1.6.0"
+gem "opentox-ruby-api-wrapper", "= 1.6.3"
require 'opentox-ruby-api-wrapper'
-LOGGER.progname = File.expand_path(__FILE__)
class Model
include DataMapper::Resource
@@ -21,6 +20,15 @@ class Model
end
+class Prediction
+ # cache predictions
+ include DataMapper::Resource
+ property :id, Serial
+ property :compound_uri, String, :length => 255
+ property :model_uri, String, :length => 255
+ property :yaml, Text, :length => 2**32-1
+end
+
DataMapper.auto_upgrade!
require 'lazar.rb'
@@ -68,6 +76,7 @@ end
delete '/?' do
# TODO delete datasets
Model.auto_migrate!
+ Prediction.auto_migrate!
response['Content-Type'] = 'text/plain'
- "All Models deleted."
+ "All models and cached predictions deleted."
end