##// END OF EJS Templates
Merged r14155 (#19405)....
Jean-Philippe Lang -
r13823:e2224d4d02ab
parent child
Show More
@@ -1,68 +1,72
1 require File.expand_path('../boot', __FILE__)
1 require File.expand_path('../boot', __FILE__)
2
2
3 require 'rails/all'
3 require 'rails/all'
4
4
5 Bundler.require(*Rails.groups)
5 Bundler.require(*Rails.groups)
6
6
7 module RedmineApp
7 module RedmineApp
8 class Application < Rails::Application
8 class Application < Rails::Application
9 # Settings in config/environments/* take precedence over those specified here.
9 # Settings in config/environments/* take precedence over those specified here.
10 # Application configuration should go into files in config/initializers
10 # Application configuration should go into files in config/initializers
11 # -- all .rb files in that directory are automatically loaded.
11 # -- all .rb files in that directory are automatically loaded.
12
12
13 # Custom directories with classes and modules you want to be autoloadable.
13 # Custom directories with classes and modules you want to be autoloadable.
14 config.autoload_paths += %W(#{config.root}/lib)
14 config.autoload_paths += %W(#{config.root}/lib)
15
15
16 # Only load the plugins named here, in the order given (default is alphabetical).
16 # Only load the plugins named here, in the order given (default is alphabetical).
17 # :all can be used as a placeholder for all plugins not explicitly named.
17 # :all can be used as a placeholder for all plugins not explicitly named.
18 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
18 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
19
19
20 config.active_record.store_full_sti_class = true
20 config.active_record.store_full_sti_class = true
21 config.active_record.default_timezone = :local
21 config.active_record.default_timezone = :local
22
22
23 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
23 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
24 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
24 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
25 # config.time_zone = 'Central Time (US & Canada)'
25 # config.time_zone = 'Central Time (US & Canada)'
26
26
27 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
27 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
28 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
28 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
29 # config.i18n.default_locale = :de
29 # config.i18n.default_locale = :de
30
30
31 I18n.enforce_available_locales = true
31 I18n.enforce_available_locales = true
32
32
33 # Configure the default encoding used in templates for Ruby 1.9.
33 # Configure the default encoding used in templates for Ruby 1.9.
34 config.encoding = "utf-8"
34 config.encoding = "utf-8"
35
35
36 # Configure sensitive parameters which will be filtered from the log file.
36 # Configure sensitive parameters which will be filtered from the log file.
37 config.filter_parameters += [:password]
37 config.filter_parameters += [:password]
38
38
39 # Enable the asset pipeline
39 # Enable the asset pipeline
40 config.assets.enabled = false
40 config.assets.enabled = false
41
41
42 # Version of your assets, change this if you want to expire all your assets
42 # Version of your assets, change this if you want to expire all your assets
43 config.assets.version = '1.0'
43 config.assets.version = '1.0'
44
44
45 config.action_mailer.perform_deliveries = false
45 config.action_mailer.perform_deliveries = false
46
46
47 # Do not include all helpers
47 # Do not include all helpers
48 config.action_controller.include_all_helpers = false
48 config.action_controller.include_all_helpers = false
49
49
50 # XML parameter parser removed from core in Rails 4.0
50 # XML parameter parser removed from core in Rails 4.0
51 # and extracted to actionpack-xml_parser gem
51 # and extracted to actionpack-xml_parser gem
52 config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
52 config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
53
53
54 # Specific cache for search results, the default file store cache is not
54 # Specific cache for search results, the default file store cache is not
55 # a good option as it could grow fast. A memory store (32MB max) is used
55 # a good option as it could grow fast. A memory store (32MB max) is used
56 # as the default. If you're running multiple server processes, it's
56 # as the default. If you're running multiple server processes, it's
57 # recommended to switch to a shared cache store (eg. mem_cache_store).
57 # recommended to switch to a shared cache store (eg. mem_cache_store).
58 # See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
58 # See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
59 # for more options (same options as config.cache_store).
59 # for more options (same options as config.cache_store).
60 config.redmine_search_cache_store = :memory_store
60 config.redmine_search_cache_store = :memory_store
61
61
62 # Configure log level here so that additional environment file
63 # can change it (environments/ENV.rb would take precedence over it)
64 config.log_level = Rails.env.production? ? :info : :debug
65
62 config.session_store :cookie_store, :key => '_redmine_session'
66 config.session_store :cookie_store, :key => '_redmine_session'
63
67
64 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
68 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
65 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
69 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
66 end
70 end
67 end
71 end
68 end
72 end
@@ -1,27 +1,25
1 Rails.application.configure do
1 Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb
2 # Settings specified here will take precedence over those in config/application.rb
3
3
4 config.log_level = :info
5
6 # Code is not reloaded between requests.
4 # Code is not reloaded between requests.
7 config.cache_classes = true
5 config.cache_classes = true
8
6
9 # Eager load code on boot. This eager loads most of Rails and
7 # Eager load code on boot. This eager loads most of Rails and
10 # your application in memory, allowing both threaded web servers
8 # your application in memory, allowing both threaded web servers
11 # and those relying on copy on write to perform better.
9 # and those relying on copy on write to perform better.
12 # Rake tasks automatically ignore this option for performance.
10 # Rake tasks automatically ignore this option for performance.
13 config.eager_load = true
11 config.eager_load = true
14
12
15 # Full error reports are disabled and caching is turned on.
13 # Full error reports are disabled and caching is turned on.
16 config.consider_all_requests_local = false
14 config.consider_all_requests_local = false
17 config.action_controller.perform_caching = true
15 config.action_controller.perform_caching = true
18
16
19 # Disable delivery errors
17 # Disable delivery errors
20 config.action_mailer.raise_delivery_errors = false
18 config.action_mailer.raise_delivery_errors = false
21
19
22 # No email in production log
20 # No email in production log
23 config.action_mailer.logger = nil
21 config.action_mailer.logger = nil
24
22
25 # Print deprecation notices to the Rails logger.
23 # Print deprecation notices to the Rails logger.
26 config.active_support.deprecation = :log
24 config.active_support.deprecation = :log
27 end
25 end
General Comments 0
You need to be logged in to leave comments. Login now