gunark / rubycas-server

Provides a single sign-on solution for web applications, implementing the server-end of JA-SIG's CAS protocol.

This URL has Read+Write access

Jacob Kjeldahl (author)
Wed Oct 07 05:32:30 -0700 2009
zuk (committer)
Sun Oct 18 11:35:18 -0700 2009
rubycas-server / config.ru
100644 39 lines (31 sloc) 1.126 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is the Rackup initialization script for running RubyCAS-Server under Passenger/Rack.
#
# This file doesn't really have anything to do with your server's "configuration",
# and you almost certainly don't need to modify it. Instead, a config file should
# have been created for you (probably under /etc/rubycas-server/config.yml) -- this
# is the file you'll want to modify. If for some reason the configuration file
# was not created for you, have a look at the config.example.yml template and
# go from there.
 
require 'rubygems'
require 'rack'
 
$APP_NAME = 'rubycas-server'
$APP_ROOT = ::File.dirname(::File.expand_path(__FILE__))
 
if ::File.exist?("#{$APP_ROOT}/tmp/debug.txt")
  require 'ruby-debug'
  Debugger.wait_connection = true
  Debugger.start_remote
end
 
$: << $APP_ROOT + "/lib"
 
require 'casserver/load_picnic'
require 'picnic'
require 'casserver'
 
CASServer.create
 
if $CONF.uri_path
map($CONF.uri_path) do
    # FIXME: this probably isn't the smartest way of remapping the themes dir to uri_path/themes
    use Rack::Static, $CONF[:static] if $CONF[:static]
run CASServer
end
else
run CASServer
end