diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 11:39:12 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 12:11:02 -0300 |
commit | 463b5d7581ee16bfaddf34ca349b7d1b5878097c (patch) | |
tree | 9837fe6a77703e471e34546a0bd1e407aac00545 | |
parent | c2e865849beadd99866e521a93d733da7d1b5255 (diff) | |
download | rails-463b5d7581ee16bfaddf34ca349b7d1b5878097c.tar.gz rails-463b5d7581ee16bfaddf34ca349b7d1b5878097c.tar.bz2 rails-463b5d7581ee16bfaddf34ca349b7d1b5878097c.zip |
Remove deprecated `serve_static_assets` configuration
-rw-r--r-- | railties/CHANGELOG.md | 4 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 21 | ||||
-rw-r--r-- | railties/test/application/configuration_test.rb | 16 |
3 files changed, 4 insertions, 37 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index f67c87d74d..a5d8d953ec 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `serve_static_assets` configuration. + + *Rafael Mendonça França* + * Use local variables in `_form.html.erb` partial generated by scaffold. *Andrew Kozlov* diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 3bb9a956c3..2821c8d757 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -1,7 +1,5 @@ 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' @@ -132,25 +130,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 diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index b3995c9a6f..8f5b2d0d68 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -320,22 +320,6 @@ module ApplicationTests end end - test "config.serve_static_assets is deprecated" do - require "#{app_path}/config/application" - - assert_deprecated(/serve_static_assets/) do - app.config.serve_static_assets = false - end - - assert_not app.config.serve_static_files - assert_deprecated(/serve_static_assets/) { assert_not app.config.serve_static_assets } - - app.config.serve_static_files = true - - assert app.config.serve_static_files - assert_deprecated(/serve_static_assets/) { assert app.config.serve_static_assets } - end - test "Use key_generator when secret_key_base is set" do make_basic_app do |application| application.secrets.secret_key_base = 'b3c631c314c0bbca50c1b2843150fe33' |