Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove deprecated serve_static_assets configuration
  • Loading branch information
rafaelfranca committed Jan 4, 2015
1 parent c2e8658 commit 463b5d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
4 changes: 4 additions & 0 deletions 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*
Expand Down
21 changes: 0 additions & 21 deletions 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'

Expand Down Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions railties/test/application/configuration_test.rb
Expand Up @@ -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'
Expand Down

0 comments on commit 463b5d7

Please sign in to comment.