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