diff options
Diffstat (limited to 'railties/lib/rails/application/configuration.rb')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 7b6cb9d8d7..25bb680f69 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -1,4 +1,3 @@ -require 'active_support/core_ext/string/encoding' require 'active_support/core_ext/kernel/reporting' require 'active_support/file_update_checker' require 'rails/engine/configuration' @@ -6,13 +5,13 @@ require 'rails/engine/configuration' module Rails class Application class Configuration < ::Rails::Engine::Configuration - attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, - :cache_classes, :cache_store, :consider_all_requests_local, + attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, :autoflush_log, + :cache_classes, :cache_store, :consider_all_requests_local, :console, :dependency_loading, :exceptions_app, :file_watcher, :filter_parameters, - :force_ssl, :helpers_paths, :logger, :log_tags, :preload_frameworks, + :force_ssl, :helpers_paths, :logger, :log_formatter, :log_tags, :preload_frameworks, :railties_order, :relative_url_root, :secret_token, :serve_static_assets, :ssl_options, :static_cache_control, :session_options, - :time_zone, :reload_classes_only_on_change + :time_zone, :reload_classes_only_on_change, :use_schema_cache_dump, :queue attr_writer :log_level attr_reader :encoding @@ -41,6 +40,10 @@ module Rails @reload_classes_only_on_change = true @file_watcher = ActiveSupport::FileUpdateChecker @exceptions_app = nil + @autoflush_log = true + @log_formatter = ActiveSupport::Logger::SimpleFormatter.new + @use_schema_cache_dump = true + @queue = Rails::Queueing::Queue @assets = ActiveSupport::OrderedOptions.new @assets.enabled = false @@ -57,6 +60,7 @@ module Rails @assets.js_compressor = nil @assets.css_compressor = nil @assets.initialize_on_precompile = true + @assets.logger = nil end def compiled_asset_path @@ -91,10 +95,10 @@ module Rails # after boot, and disables reloading code on every request, as these are # fundamentally incompatible with thread safety. def threadsafe! - self.preload_frameworks = true - self.cache_classes = true - self.dependency_loading = false - self.allow_concurrency = true + @preload_frameworks = true + @cache_classes = true + @dependency_loading = false + @allow_concurrency = true self end @@ -103,7 +107,7 @@ module Rails # YAML::load. def database_configuration require 'erb' - YAML::load(ERB.new(IO.read(paths["config/database"].first)).result) + YAML.load ERB.new(IO.read(paths["config/database"].first)).result end def log_level @@ -111,11 +115,10 @@ module Rails end def colorize_logging - @colorize_logging + ActiveSupport::LogSubscriber.colorize_logging end def colorize_logging=(val) - @colorize_logging = val ActiveSupport::LogSubscriber.colorize_logging = val self.generators.colorize_logging = val end |