summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2010-02-01 16:30:18 +0100
committermr <mr@mrautenberg.de>2010-02-01 16:30:18 +0100
commit6510b62d8d66e8e961ab28f116d0802519e57f3a (patch)
tree6ab43c4d574bb4c74852dcc64f283bd2a7949673 /lib
parente0b1279e10451294662bdd19b11568c39128bdc3 (diff)
parent70fef6f3fbf3e629947534949774d93dc5ea7fe2 (diff)
Merge branch 'test' of git://github.com/helma/opentox-ruby-api-wrapper into test
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/config.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tasks/config.rb b/lib/tasks/config.rb
new file mode 100644
index 0000000..3720ef3
--- /dev/null
+++ b/lib/tasks/config.rb
@@ -0,0 +1,19 @@
+require 'rubygems'
+require 'rack'
+require 'rack/contrib'
+require 'application.rb'
+
+# log at centralized place
+logfile = "#{LOG_DIR}/#{ENV["RACK_ENV"]}.log"
+log = File.new(logfile, "a+")
+$stdout.reopen(log)
+$stderr.reopen(log)
+$stdout.sync = true
+$stderr.sync = true
+set :raise_errors, true
+
+['public','tmp'].each do |dir|
+ FileUtils.mkdir_p dir unless File.exists?(dir)
+end
+
+use Rack::ShowExceptions