diff options
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 15 |
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 |