Permalink
Browse files

Remove deprecated `serve_static_assets` configuration

  • Loading branch information...
rafaelfranca committed Jan 4, 2015
1 parent c2e8658 commit 463b5d7581ee16bfaddf34ca349b7d1b5878097c
View
@@ -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*
@@ -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 @@ def colorize_logging=(val)
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
@@ -320,22 +320,6 @@ def assert_utf8
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'

0 comments on commit 463b5d7

Please sign in to comment.