diff options
Diffstat (limited to 'railties/lib/rails/application/configuration.rb')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index fdc741dd08..dc3ec4274b 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -1,14 +1,12 @@ require 'active_support/core_ext/kernel/reporting' -require 'active_support/core_ext/string/filters' require 'active_support/file_update_checker' -require 'active_support/deprecation' require 'rails/engine/configuration' require 'rails/source_annotation_extractor' module Rails class Application class Configuration < ::Rails::Engine::Configuration - attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, + attr_accessor :allow_concurrency, :asset_host, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :log_tags, @@ -17,6 +15,7 @@ module Rails :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x + attr_writer :log_level attr_reader :encoding def initialize(*) @@ -35,7 +34,6 @@ module Rails @session_options = {} @time_zone = "UTC" @beginning_of_week = :monday - @has_explicit_log_level = false @log_level = nil @middleware = app_middleware @generators = app_generators @@ -51,21 +49,6 @@ module Rails @secret_token = nil @secret_key_base = nil @x = Custom.new - - @assets = ActiveSupport::OrderedOptions.new - @assets.enabled = true - @assets.paths = [] - @assets.precompile = [ Proc.new { |path, fn| fn =~ /app\/assets/ && !%w(.js .css).include?(File.extname(path)) }, - /(?:\/|\\|\A)application\.(css|js)$/ ] - @assets.prefix = "/assets" - @assets.version = '1.0' - @assets.debug = false - @assets.compile = true - @assets.digest = false - @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/#{Rails.env}/" ] - @assets.js_compressor = nil - @assets.css_compressor = nil - @assets.logger = nil end def encoding=(value) @@ -119,15 +102,6 @@ module Rails raise e, "Cannot load `Rails.application.database_configuration`:\n#{e.message}", e.backtrace end - def has_explicit_log_level? # :nodoc: - @has_explicit_log_level - end - - def log_level=(level) - @has_explicit_log_level = !!(level) - @log_level = level - end - def log_level @log_level ||= (Rails.env.production? ? :info : :debug) end @@ -141,25 +115,6 @@ module Rails self.generators.colorize_logging = val end - # :nodoc: - SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE = <<-MSG.squish - The configuration option `config.serve_static_assets` has been renamed - to `config.serve_static_files` to clarify its role (it merely enables - serving everything in the `public` folder and is unrelated to the asset - pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. - Please migrate your configuration files accordingly. - MSG - - def serve_static_assets - ActiveSupport::Deprecation.warn SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE - serve_static_files - end - - def serve_static_assets=(value) - ActiveSupport::Deprecation.warn SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE - self.serve_static_files = value - end - def session_store(*args) if args.empty? case @session_store |