You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
757 B

  1. require 'rubygems'
  2. require 'gollum/app'
  3. require 'rack'
  4. require 'rack/cache'
  5. ### start gollum with `rackup`
  6. set :environment, :production
  7. gollum_path = File.expand_path(File.dirname(__FILE__))
  8. Precious::App.set(:gollum_path, gollum_path)
  9. Precious::App.set(:base_path, 'wiki')
  10. Precious::App.set(
  11. :wiki_options,
  12. {
  13. :css => true,
  14. :js => true,
  15. :live_preview => false
  16. }
  17. )
  18. # Add in commit user/email
  19. class Precious::App
  20. before do
  21. session['gollum.author'] = {
  22. :name => "%s" % [env['HTTP_X_PROXY_REMOTE_USER_NAME']],
  23. :email => "%s" % env['HTTP_X_PROXY_REMOTE_USER_MAIL'],
  24. }
  25. end
  26. end
  27. # since --base-path does not work with rack
  28. map '/wiki' do
  29. run Precious::App
  30. end