diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-04-08 15:39:55 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-03 11:46:30 +0200 |
commit | 78751b778a5dabfac142a017fc1e0d8d1c045acd (patch) | |
tree | 6257c90d38d1082637a65e3846944bd313464edd /application.rb | |
parent | d5fe870fa184ef44390a0311664b7813360a44f5 (diff) |
switch from datamapper/mysql to redis (sqlite for qmrf)
Diffstat (limited to 'application.rb')
-rwxr-xr-x | application.rb | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/application.rb b/application.rb index ad9653a..10c8fe6 100755 --- a/application.rb +++ b/application.rb @@ -1,16 +1,8 @@ require 'rubygems' -gem "opentox-ruby", "~> 0" -[ 'sinatra', 'sinatra/url_for', 'opentox-ruby' ].each do |lib| +gem "opentox-ruby" +[ 'sinatra', 'sinatra/url_for', 'opentox-ruby', 'benchmark' ].each do |lib| require lib end -['dm-core', 'dm-serializer', 'dm-timestamps', 'dm-types', 'dm-migrations', 'dm-validations' ].each{|lib| require lib } -DataMapper.setup(:default, { - :adapter => CONFIG[:database][:adapter], - :database => CONFIG[:database][:database], - :username => CONFIG[:database][:username], - :password => CONFIG[:database][:password], - :host => CONFIG[:database][:host]}) -set :lock, true #unless(defined? LOGGER) #LOGGER = Logger.new(STDOUT) @@ -37,7 +29,7 @@ end get '/prepare_examples/?' do LOGGER.info "prepare examples" content_type "text/plain" - Example.prepare_example_resources + return_task(Example.prepare_example_resources) end post '/test_examples/?' do |