File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ * Remove deprecated ` config.serve_static_files ` .
2+
3+ * Rafael Mendonça França*
4+
15* Remove deprecated ` config.static_cache_control ` .
26
37 * Rafael Mendonça França*
Original file line number Diff line number Diff line change 44require "rails/source_annotation_extractor"
55
66require "active_support/deprecation"
7- require "active_support/core_ext/string/strip" # for strip_heredoc
87
98module Rails
109 class Application
@@ -56,24 +55,6 @@ def initialize(*)
5655 @enable_dependency_loading = false
5756 end
5857
59- def serve_static_files
60- ActiveSupport ::Deprecation . warn <<-eow . strip_heredoc
61- `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
62- Please use `config.public_file_server.enabled` instead.
63- eow
64-
65- @public_file_server . enabled
66- end
67-
68- def serve_static_files = ( value )
69- ActiveSupport ::Deprecation . warn <<-eow . strip_heredoc
70- `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
71- Please use `config.public_file_server.enabled = #{ value } ` instead.
72- eow
73-
74- @public_file_server . enabled = value
75- end
76-
7758 def encoding = ( value )
7859 @encoding = value
7960 silence_warnings do
Original file line number Diff line number Diff line change @@ -369,16 +369,6 @@ def assert_utf8
369369 end
370370 end
371371
372- test "config.serve_static_files is deprecated" do
373- make_basic_app do |application |
374- assert_deprecated do
375- application . config . serve_static_files = true
376- end
377-
378- assert application . config . public_file_server . enabled
379- end
380- end
381-
382372 test "Use key_generator when secret_key_base is set" do
383373 make_basic_app do |application |
384374 application . secrets . secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
You can’t perform that action at this time.
0 commit comments