summaryrefslogtreecommitdiff
path: root/lib/environment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/environment.rb')
-rw-r--r--lib/environment.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/environment.rb b/lib/environment.rb
index 6d1bb85..3775797 100644
--- a/lib/environment.rb
+++ b/lib/environment.rb
@@ -40,8 +40,8 @@ else
end
# Regular expressions for parsing classification data
-TRUE_REGEXP = /^(true|active|1|1.0|tox|activating)$/i
-FALSE_REGEXP = /^(false|inactive|0|0.0|low tox|deactivating)$/i
+TRUE_REGEXP = /^(true|active|1|1.0|tox|activating|carcinogen|mutagenic)$/i
+FALSE_REGEXP = /^(false|inactive|0|0.0|low tox|deactivating|non-carcinogen|non-mutagenic)$/i
# Task durations
DEFAULT_TASK_MAX_DURATION = 36000
@@ -74,6 +74,13 @@ CONFIG[:authorization][:authenticate_request] = [""] unless CONFIG[:authorizatio
CONFIG[:authorization][:authorize_request] = [""] unless CONFIG[:authorization][:authorize_request]
CONFIG[:authorization][:free_request] = [""] unless CONFIG[:authorization][:free_request]
+ONTOLOGY_SERVER = CONFIG[:services]["opentox-ontology"] ? CONFIG[:services]["opentox-ontology"] : "http://apps.ideaconsult.net:8080/ontology"
+
+cookie_secret = CONFIG[:authorization] ? CONFIG[:authorization][:cookie_secret] : nil
+cookie_secret = cookie_secret ? cookie_secret : "ui6vaiNi-change_me"
+use Rack::Session::Cookie, :expire_after => 28800,
+ :secret => cookie_secret
+
RDF = OwlNamespace.new 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
OWL = OwlNamespace.new 'http://www.w3.org/2002/07/owl#'
DC = OwlNamespace.new 'http://purl.org/dc/elements/1.1/'