File tree Expand file tree Collapse file tree 7 files changed +23
-5
lines changed
actionmailbox/test/dummy/config/environments
actiontext/test/dummy/config/environments
activestorage/test/dummy/config/environments
lib/rails/generators/rails/app/templates/config/environments Expand file tree Collapse file tree 7 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 18
18
config . eager_load = ENV [ "CI" ] . present?
19
19
20
20
# Configure public file server for tests with Cache-Control for performance.
21
- config . public_file_server . enabled = true
22
21
config . public_file_server . headers = {
23
22
"Cache-Control" => "public, max-age=#{ 1 . hour . to_i } "
24
23
}
Original file line number Diff line number Diff line change 18
18
config . eager_load = ENV [ "CI" ] . present?
19
19
20
20
# Configure public file server for tests with Cache-Control for performance.
21
- config . public_file_server . enabled = true
22
21
config . public_file_server . headers = {
23
22
"Cache-Control" => "public, max-age=#{ 1 . hour . to_i } "
24
23
}
Original file line number Diff line number Diff line change 18
18
config . eager_load = ENV [ "CI" ] . present?
19
19
20
20
# Configure public file server for tests with Cache-Control for performance.
21
- config . public_file_server . enabled = true
22
21
config . public_file_server . headers = {
23
22
"Cache-Control" => "public, max-age=#{ 1 . hour . to_i } "
24
23
}
Original file line number Diff line number Diff line change 37
37
38
38
*Steve Polito*
39
39
40
+ * Remove the option `config.public_file_server.enabled` from the generators
41
+ for all environments, as the value is the same in all environments.
42
+
43
+ *Adrian Hirt*
44
+
40
45
Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/railties/CHANGELOG.md) for previous changes.
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ Rails.application.configure do
18
18
config.eager_load = ENV["CI"].present?
19
19
20
20
# Configure public file server for tests with Cache-Control for performance.
21
- config.public_file_server.enabled = true
22
21
config.public_file_server.headers = {
23
22
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
24
23
}
Original file line number Diff line number Diff line change @@ -250,7 +250,6 @@ class User < ActiveRecord::Base; raise 'should not be reached'; end
250
250
test "assets do not require any assets group gem when manifest file is present" do
251
251
app_file "app/assets/javascripts/application.js" , "alert();"
252
252
app_file "app/assets/config/manifest.js" , "//= link application.js"
253
- add_to_env_config "production" , "config.public_file_server.enabled = true"
254
253
255
254
precompile! RAILS_ENV : "production"
256
255
Original file line number Diff line number Diff line change @@ -695,6 +695,24 @@ def assert_utf8
695
695
assert_equal Pathname . new ( app_path ) . join ( "somewhere" ) , Rails . public_path
696
696
end
697
697
698
+ test "In development mode, config.public_file_server.enabled is on by default" do
699
+ restore_default_config
700
+
701
+ with_rails_env "development" do
702
+ app "development"
703
+ assert app . config . public_file_server . enabled
704
+ end
705
+ end
706
+
707
+ test "In test mode, config.public_file_server.enabled is on by default" do
708
+ restore_default_config
709
+
710
+ with_rails_env "test" do
711
+ app "test"
712
+ assert app . config . public_file_server . enabled
713
+ end
714
+ end
715
+
698
716
test "In production mode, config.public_file_server.enabled is on by default" do
699
717
restore_default_config
700
718
You can’t perform that action at this time.
0 commit comments