Guest User

Untitled

a guest
Mar 3rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. $MAIN_PATH = File.expand_path(File.dirname(__FILE__) + '/..')
  2.  
  3. module Ramaze
  4. Global.adapter = :mongrel
  5.  
  6. Global.host = '0.0.0.0'
  7. Global.port = 9500
  8.  
  9. Global.cookies = true
  10. Global.error_page = true
  11.  
  12. #Global.cache = :MemcachedCache
  13.  
  14. Global.cache_all = false
  15.  
  16. Analogger.trait :name => 'esf'
  17. Inform.loggers = [Analogger.new, Growl.new]
  18.  
  19. module Template
  20. Ezamar.trait[:transform_pipeline] = [::Ezamar::Element, Ezamar]
  21. end
  22.  
  23. require 'ramaze/tool/localize'
  24.  
  25. Tool::Localize.trait :file => "#{$MAIN_PATH}/conf/localize_%s.yaml"
  26. Tool::Localize.trait :languages => %w[en fi], :enable => true
  27.  
  28. Dispatcher::Action.trait[:filter] = [Tool::Localize]
  29. end
  30.  
  31. # Module Configurations
  32.  
  33. DMS.trait :public => "#{$MAIN_PATH}/public"
  34.  
  35. #$PROFILE = [:og]
  36.  
  37. #
  38. # Og Configuration
  39. #
  40.  
  41. $DBG = ENV['OG_DBG'] ? (ENV['OG_DBG'] =~ /true/) : true
  42.  
  43. Og.create_schema = ENV['OG_CREATE_SCHEMA'] || false
  44.  
  45. # catches all Og Logger output
  46. Logger.send(:class_variable_set, "@@global_logger", Ramaze::Inform)
  47.  
  48. Og.manager_options.update(
  49. :evolve_schema => :add,
  50. :adapter => :postgresql,
  51. :name => 'esf',
  52. :user => 'john',
  53. :password => nil,
  54. :classes => nil
  55. )
  56.  
  57. begin
  58. mode = ENV['RAMAZE_MODE'] || 'debug'
  59. require "#{$MAIN_PATH}/conf/#{mode}.rb"
  60. rescue LoadError => e
  61. puts e.to_s
  62. puts e.backtrace
  63. require "#{$MAIN_PATH}/conf/debug.rb"
  64. end
Add Comment
Please, Sign In to add comment