diff options
author | Christoph Helma <helma@in-silico.de> | 2010-02-02 16:55:10 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-02-02 16:55:10 +0100 |
commit | b3c5ec6eb3162fb869a03ca5e1000ebe118efa42 (patch) | |
tree | bc166347f2fb2b04d91933214d424f49b121e96d | |
parent | 5ddaec2bc75ad2fe3830d0def940b34e38461baf (diff) |
centralized database
-rw-r--r-- | application.rb | 9 | ||||
-rw-r--r-- | config.ru | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/application.rb b/application.rb index a17cf01..f59e48d 100644 --- a/application.rb +++ b/application.rb @@ -1,12 +1,6 @@ require 'rubygems' -gem 'opentox-ruby-api-wrapper', '= 1.2.6' +gem 'opentox-ruby-api-wrapper', '= 1.2.7' require 'opentox-ruby-api-wrapper' -require 'dm-core' -require 'dm-serializer' -require 'dm-timestamps' -require 'dm-types' - -DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/task.sqlite3") class Task include DataMapper::Resource @@ -37,6 +31,7 @@ get '/:id/:property/?' do end post '/?' do + LOGGER.debug "Creating new task ..." task = Task.new task.save # needed to create id task.uri = url_for("/#{task.id}", :full) @@ -1,5 +1,5 @@ require 'rubygems' require 'opentox-ruby-api-wrapper' -require 'tasks/config' +require 'config/config_ru' run Sinatra::Application |