blob: c9506eddb61f18b8392cc47d478422bb93a67781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
[ 'rubygems', 'sinatra', 'sinatra/url_for', 'opentox-ruby-api-wrapper', 'logger' ].each do |lib|
require lib
end
unless(defined? LOGGER)
LOGGER = Logger.new(STDOUT)
LOGGER.datetime_format = "%Y-%m-%d %H:%M:%S "
end
require "example.rb"
get '/examples/?' do
content_type "text/plain"
Example.transform_example
end
get '/prepare_examples/?' do
Example.prepare_example_resources
"done"
end
# order is important, first add example methods, than validation
# (otherwise sinatra will try to locate a validation with name examples)
require "validation/validation_application.rb"
require "report/report_application.rb"
|