added config option for custom public dir

This commit is contained in:
Matt Zukowski 2011-03-09 15:30:06 -05:00
Родитель 9659415fee
Коммит 44ed7b96d7
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -480,9 +480,14 @@ organization: CAS
# if you prefer to have no extra text shown at the bottom of the login box. # if you prefer to have no extra text shown at the bottom of the login box.
infoline: Powered by <a href="http://code.google.com/p/rubycas-server/">RubyCAS-Server</a> infoline: Powered by <a href="http://code.google.com/p/rubycas-server/">RubyCAS-Server</a>
# Custom views file. Overrides methodes in lib/casserver/views.rb # Custom views directory. If set, this will be used instead of 'lib/casserver/views'.
#custom_views: /path/to/custom/views #custom_views: /path/to/custom/views
# Custom public directory. If set, static content (css, etc.) will be served from here rather
# than from rubycas-server's internal 'public' directory (but be mindful of any overriding
# settings you may have in your web server's config).
#public_dir: /path/to/custom/public
##### LOCALIZATION (L10N) ####################################################### ##### LOCALIZATION (L10N) #######################################################
# The server will attempt to detect the user's locale and show text in the # The server will attempt to detect the user's locale and show text in the
# appropriate language based on: # appropriate language based on:

Просмотреть файл

@ -14,7 +14,7 @@ module CASServer
include Localization include Localization
set :app_file, __FILE__ set :app_file, __FILE__
set :public, Proc.new { File.join(root, "..", "..", "public") } set :public, Proc.new { settings.config[:public_dir] || File.join(root, "..", "..", "public") }
config = HashWithIndifferentAccess.new( config = HashWithIndifferentAccess.new(
:maximum_unused_login_ticket_lifetime => 5.minutes, :maximum_unused_login_ticket_lifetime => 5.minutes,