Browse files

Adding ability to provide your own `require` and `register` strings f…

…or matchers.
  • Loading branch information...
1 parent 40b5400 commit 3f5300ab972519ef6e6a77d99b3c6129172b7adf @Slotos committed Jun 14, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/casserver/server.rb
View
6 lib/casserver/server.rb
@@ -221,9 +221,9 @@ def self.init_matchers!
return nil unless config[:matcher]
- config[:matcher].each do |name, _|
- require "rubycas-#{name}-matcher"
- register "CASServer::Matchers::#{name.capitalize}".constantize
+ config[:matcher].each do |name, conf|
+ require ( conf[:require] || "rubycas-#{name}-matcher" )
+ register ( conf[:register] || "CASServer::Matchers::#{name.capitalize}".constantize )
end
set :oauth_links, oauth_links

0 comments on commit 3f5300a

Please sign in to comment.