Permalink
Browse files

Fixed load paths so that they get put at the top and checked first

Removed redundant lib/casserver load path
Replaced strange vendored isaac load paths and requires with crypt-isaac requires
  • Loading branch information...
1 parent 78ebf04 commit 01dd11468cedfeb188d4785c519178e50e2df4f9 @jcwilk jcwilk committed Dec 30, 2010
View
@@ -5,7 +5,7 @@ $KCODE = 'u' if RUBY_VERSION < '1.9'
require 'rubygems'
-$: << File.dirname(__FILE__) + "/../lib"
+$:.unshift File.dirname(__FILE__) + "/../lib"
if ARGV.join.match('--debugger')
require 'ruby-debug'
View
@@ -1,7 +1,7 @@
require 'rubygems'
require 'bundler/setup'
-$: << "#{File.dirname(__FILE__)}/lib"
+$:.unshift "#{File.dirname(__FILE__)}/lib"
require "casserver"
use Rack::ShowExceptions
View
@@ -1,13 +1,10 @@
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 'logger'
$LOG = Logger.new(STDOUT)
-require 'server'
+require 'casserver/server'
@@ -2,9 +2,7 @@
require 'digest/sha1'
require 'digest/sha2'
-
-$: << File.dirname(File.expand_path(__FILE__)) + "/../../../vendor/isaac_0.9.1"
-require 'crypt/ISAAC'
+require 'crypt-isaac'
# This is a more secure version of the SQL authenticator. Passwords are encrypted
# rather than being stored in plain text.
View
@@ -1,7 +1,4 @@
require 'sinatra/base'
-
-$: << File.expand_path(File.dirname(__FILE__)) + '/../../vendor/isaac_0.9.1'
-
require 'casserver/localization'
require 'casserver/utils'
require 'casserver/cas'
View
@@ -19,7 +19,7 @@ if ::File.exist?("#{$APP_ROOT}/tmp/debug.txt")
Debugger.start_remote
end
-$: << $APP_ROOT + "/lib"
+$:.unshift $APP_ROOT + "/lib"
require 'casserver/load_picnic'
require 'picnic'
View
@@ -1,7 +1,7 @@
namespace :db do
desc "bring your CAS server database schema up to date (options CONFIG=/path/to/config.yml)"
task :migrate do |t|
- $: << File.dirname(__FILE__) + "/../../lib"
+ $:.unshift File.dirname(__FILE__) + "/../../lib"
require 'casserver/server'

0 comments on commit 01dd114

Please sign in to comment.