diff options
Diffstat (limited to 'lib/environment.rb')
-rw-r--r-- | lib/environment.rb | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/lib/environment.rb b/lib/environment.rb index 6c3523b..d164925 100644 --- a/lib/environment.rb +++ b/lib/environment.rb @@ -3,7 +3,7 @@ ENV['RACK_ENV'] = 'production' unless ENV['RACK_ENV'] # load/setup configuration -basedir = File.join(ENV['HOME'], ".toxbank") +basedir = File.join(ENV['HOME'], ".opentox") config_dir = File.join(basedir, "config") config_file = File.join(config_dir, "#{ENV['RACK_ENV']}.yaml") @@ -22,7 +22,7 @@ else end logfile = "#{LOG_DIR}/#{ENV["RACK_ENV"]}.log" -#$logger = OTLogger.new(logfile,'daily') # daily rotation + $logger = OTLogger.new(logfile) # no rotation $logger.formatter = Logger::Formatter.new #this is neccessary to restore the formating in case active-record is loaded if CONFIG[:logger] and CONFIG[:logger] == "debug" @@ -35,40 +35,8 @@ end 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 -# OWL Namespaces -=begin -class OwlNamespace - - attr_accessor :uri - def initialize(uri) - @uri = uri - end - - def [](property) - @uri+property.to_s - end - - def type # for RDF.type - "#{@uri}type" - end - - def method_missing(property) - @uri+property.to_s - end - -end -=end - AA_SERVER = CONFIG[:authorization] ? (CONFIG[:authorization][:server] ? CONFIG[:authorization][:server] : nil) : nil CONFIG[:authorization][:authenticate_request] = [""] unless CONFIG[:authorization][:authenticate_request] CONFIG[:authorization][:authorize_request] = [""] unless CONFIG[:authorization][:authorize_request] CONFIG[:authorization][:free_request] = [""] unless CONFIG[:authorization][:free_request] -#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/' -#OT = OwlNamespace.new 'http://www.opentox.org/api/1.1#' -#OTA = OwlNamespace.new 'http://www.opentox.org/algorithmTypes.owl#' -#XSD = OwlNamespace.new 'http://www.w3.org/2001/XMLSchema#' - - |