From bca943238fde66d102c5903956fd4fefcacb7b3e Mon Sep 17 00:00:00 2001 From: Damien Le Berrigaud Date: Wed, 22 Sep 2010 15:30:12 +1000 Subject: [PATCH] Require ruby-debug if --debugger option given to binary. --- bin/rubycas-server | 8 ++++++-- lib/casserver.rb | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/bin/rubycas-server b/bin/rubycas-server index c476e30..431d237 100755 --- a/bin/rubycas-server +++ b/bin/rubycas-server @@ -4,6 +4,10 @@ require 'rubygems' $: << File.dirname(__FILE__) + "/../lib" -require 'casserver/server' +if ARGV.join.match('--debugger') + require 'ruby-debug' + puts "=> Debugger Enabled" +end +require 'casserver' -CASServer::Server.run! \ No newline at end of file +CASServer::Server.run! diff --git a/lib/casserver.rb b/lib/casserver.rb index 835c433..6a14df9 100644 --- a/lib/casserver.rb +++ b/lib/casserver.rb @@ -1,2 +1,14 @@ -module CASServer -end \ No newline at end of file +module CASServer; end + +$: << File.expand_path(File.dirname(__FILE__) + '/casserver') +$: << File.expand_path(File.dirname(__FILE__) + '/../vendor/isaac_0.9.1') + +require 'active_record' +require 'active_support' +require 'sinatra/base' +require 'haml' +require 'logger' +$LOG = Logger.new(STDOUT) + +require 'server' +