1
|
# Be sure to restart your web server when you modify this file.
|
2
|
|
3
|
# Uncomment below to force Rails into production mode when
|
4
|
# you don't control web/app server and can't set it the proper way
|
5
|
# ENV['RAILS_ENV'] ||= 'production'
|
6
|
|
7
|
# Bootstrap the Rails environment, frameworks, and default configuration
|
8
|
require File.join(File.dirname(__FILE__), 'boot')
|
9
|
|
10
|
Rails::Initializer.run do |config|
|
11
|
# Settings in config/environments/* take precedence those specified here
|
12
|
|
13
|
# Skip frameworks you're not going to use
|
14
|
# config.frameworks -= [ :action_web_service, :action_mailer ]
|
15
|
|
16
|
# Add additional load paths for sweepers
|
17
|
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )
|
18
|
|
19
|
# Force all environments to use the same logger level
|
20
|
# (by default production uses :info, the others :debug)
|
21
|
# config.log_level = :debug
|
22
|
|
23
|
# Use the database for sessions instead of the file system
|
24
|
# (create the session table with 'rake create_sessions_table')
|
25
|
# config.action_controller.session_store = :active_record_store
|
26
|
|
27
|
# Enable page/fragment caching by setting a file-based store
|
28
|
# (remember to create the caching directory and make it readable to the application)
|
29
|
# config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
|
30
|
|
31
|
# Activate observers that should always be running
|
32
|
# config.active_record.observers = :cacher, :garbage_collector
|
33
|
config.active_record.observers = :message_observer
|
34
|
|
35
|
# Make Active Record use UTC-base instead of local time
|
36
|
# config.active_record.default_timezone = :utc
|
37
|
|
38
|
# Use Active Record's schema dumper instead of SQL when creating the test database
|
39
|
# (enables use of different database adapters for development and test environments)
|
40
|
# config.active_record.schema_format = :ruby
|
41
|
|
42
|
# See Rails::Configuration for more options
|
43
|
|
44
|
# SMTP server configuration
|
45
|
config.action_mailer.smtp_settings = {
|
46
|
:address => "127.0.0.1",
|
47
|
:port => 25,
|
48
|
:domain => "somenet.foo",
|
49
|
:authentication => :login,
|
50
|
:user_name => "redmine",
|
51
|
:password => "redmine",
|
52
|
}
|
53
|
|
54
|
config.action_mailer.perform_deliveries = true
|
55
|
|
56
|
# Tell ActionMailer not to deliver emails to the real world.
|
57
|
# The :test delivery method accumulates sent emails in the
|
58
|
# ActionMailer::Base.deliveries array.
|
59
|
#config.action_mailer.delivery_method = :test
|
60
|
config.action_mailer.delivery_method = :smtp
|
61
|
|
62
|
# Uncomment this line if the engines plugin is installed.
|
63
|
# This will ensure that engines is loaded first.
|
64
|
# config.plugins = ["engines", "*"]
|
65
|
end
|
66
|
|
67
|
ActiveRecord::Errors.default_error_messages = {
|
68
|
:inclusion => "activerecord_error_inclusion",
|
69
|
:exclusion => "activerecord_error_exclusion",
|
70
|
:invalid => "activerecord_error_invalid",
|
71
|
:confirmation => "activerecord_error_confirmation",
|
72
|
:accepted => "activerecord_error_accepted",
|
73
|
:empty => "activerecord_error_empty",
|
74
|
:blank => "activerecord_error_blank",
|
75
|
:too_long => "activerecord_error_too_long",
|
76
|
:too_short => "activerecord_error_too_short",
|
77
|
:wrong_length => "activerecord_error_wrong_length",
|
78
|
:taken => "activerecord_error_taken",
|
79
|
:not_a_number => "activerecord_error_not_a_number"
|
80
|
}
|
81
|
|
82
|
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
|
83
|
|
84
|
GLoc.set_config :default_language => :en
|
85
|
GLoc.clear_strings
|
86
|
GLoc.set_kcode
|
87
|
GLoc.load_localized_strings
|
88
|
GLoc.set_config(:raise_string_not_found_errors => false)
|
89
|
|
90
|
require 'redmine'
|
91
|
|