File tree 3 files changed +4
-29
lines changed
3 files changed +4
-29
lines changed 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
+
1
5
* Remove deprecated ` config.static_cache_control ` .
2
6
3
7
* Rafael Mendonça França*
Original file line number Diff line number Diff line change 4
4
require "rails/source_annotation_extractor"
5
5
6
6
require "active_support/deprecation"
7
- require "active_support/core_ext/string/strip" # for strip_heredoc
8
7
9
8
module Rails
10
9
class Application
@@ -56,24 +55,6 @@ def initialize(*)
56
55
@enable_dependency_loading = false
57
56
end
58
57
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
-
77
58
def encoding = ( value )
78
59
@encoding = value
79
60
silence_warnings do
Original file line number Diff line number Diff line change @@ -369,16 +369,6 @@ def assert_utf8
369
369
end
370
370
end
371
371
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
-
382
372
test "Use key_generator when secret_key_base is set" do
383
373
make_basic_app do |application |
384
374
application . secrets . secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
You can’t perform that action at this time.
0 commit comments