<commit_before>unless Object.const_defined?(:Picnic)
  $APP_NAME ||= 'rubycas-server'
  $APP_ROOT ||= File.expand_path(File.dirname(__FILE__)+'/..')

  require 'casserver/load_picnic'
end

require 'yaml'
require 'markaby'

require "casserver/conf"
require "picnic/logger"

$: << File.dirname(File.expand_path(__FILE__))

$: << File.expand_path("#{File.dirname(__FILE__)}/../vendor/isaac_0.9.1")
require 'crypt/ISAAC'

Camping.goes :CASServer

Picnic::Logger.init_global_logger!

require "casserver/utils"
require "casserver/models"
require "casserver/cas"
require "casserver/views"
require "casserver/controllers"
require "casserver/localization"

def CASServer.create
  CASServer::Models::Base.establish_connection($CONF.database)
  CASServer::Models.create_schema

  #TODO: these warnings should eventually be deleted
  if $CONF.service_ticket_expiry
    $LOG.warn "The 'service_ticket_expiry' option has been renamed to 'maximum_unused_service_ticket_lifetime'. Please make the necessary change to your config file!"
    $CONF.maximum_unused_service_ticket_lifetime ||= $CONF.service_ticket_expiry<commit_msg>a message is with the current pid is now shown in the log whenever the server starts up (makes debugging a bit easier, especially under passenger)<commit_after>unless Object.const_defined?(:Picnic)
  $APP_NAME ||= 'rubycas-server'
  $APP_ROOT ||= File.expand_path(File.dirname(__FILE__)+'/..')

  require 'casserver/load_picnic'
end

require 'yaml'
require 'markaby'

require "casserver/conf"
require "picnic/logger"

$: << File.dirname(File.expand_path(__FILE__))

$: << File.expand_path("#{File.dirname(__FILE__)}/../vendor/isaac_0.9.1")
require 'crypt/ISAAC'

Camping.goes :CASServer

Picnic::Logger.init_global_logger!

require "casserver/utils"
require "casserver/models"
require "casserver/cas"
require "casserver/views"
require "casserver/controllers"
require "casserver/localization"

def CASServer.create
  $LOG.info "Creating RubyCAS-Server with pid #{Process.pid}."


  CASServer::Models::Base.establish_connection($CONF.database)
  CASServer::Models.create_schema

  #TODO: these warnings should eventually be deleted
  if $CONF.service_ticket_expiry
    $LOG.warn "The 'service_ticket_expiry' option has been renamed to 'maximum_unused_service_ticket_lifetime'. Please make the necessary change to your config file!"
    $CONF.maximum_unused_service_ticket_lifetime ||= $CONF.service_ticket_expiry
{'fraction_non_alphanumeric': 0.11849710982658959, 'fraction_numerical': 0.002477291494632535, 'mean_word_length': 6.298192771084337, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6025276', 'n_tokens_mistral': 825, 'n_tokens_neox': 781, 'n_words': 168}