railties 6.1.6 → 7.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +626 -259
  3. data/MIT-LICENSE +1 -1
  4. data/RDOC_MAIN.md +99 -0
  5. data/README.rdoc +5 -6
  6. data/lib/minitest/rails_plugin.rb +64 -1
  7. data/lib/rails/all.rb +0 -1
  8. data/lib/rails/api/task.rb +35 -4
  9. data/lib/rails/app_updater.rb +9 -6
  10. data/lib/rails/application/bootstrap.rb +41 -7
  11. data/lib/rails/application/configuration.rb +262 -88
  12. data/lib/rails/application/default_middleware_stack.rb +29 -4
  13. data/lib/rails/application/dummy_config.rb +19 -0
  14. data/lib/rails/application/finisher.rb +89 -124
  15. data/lib/rails/application/routes_reloader.rb +8 -0
  16. data/lib/rails/application.rb +200 -125
  17. data/lib/rails/application_controller.rb +3 -3
  18. data/lib/rails/autoloaders/inflector.rb +21 -0
  19. data/lib/rails/autoloaders.rb +42 -42
  20. data/lib/rails/backtrace_cleaner.rb +1 -1
  21. data/lib/rails/cli.rb +5 -2
  22. data/lib/rails/code_statistics.rb +2 -2
  23. data/lib/rails/code_statistics_calculator.rb +10 -1
  24. data/lib/rails/command/actions.rb +10 -12
  25. data/lib/rails/command/base.rb +61 -45
  26. data/lib/rails/command/behavior.rb +1 -1
  27. data/lib/rails/command/environment_argument.rb +33 -17
  28. data/lib/rails/command/helpers/editor.rb +17 -12
  29. data/lib/rails/command.rb +90 -36
  30. data/lib/rails/commands/about/about_command.rb +14 -0
  31. data/lib/rails/commands/application/application_command.rb +2 -0
  32. data/lib/rails/commands/console/console_command.rb +17 -13
  33. data/lib/rails/commands/credentials/USAGE +53 -53
  34. data/lib/rails/commands/credentials/credentials_command/diffing.rb +31 -19
  35. data/lib/rails/commands/credentials/credentials_command.rb +67 -69
  36. data/lib/rails/commands/db/system/change/change_command.rb +2 -1
  37. data/lib/rails/commands/dbconsole/dbconsole_command.rb +26 -117
  38. data/lib/rails/commands/destroy/destroy_command.rb +3 -2
  39. data/lib/rails/commands/dev/dev_command.rb +1 -6
  40. data/lib/rails/commands/encrypted/USAGE +15 -20
  41. data/lib/rails/commands/encrypted/encrypted_command.rb +46 -35
  42. data/lib/rails/commands/gem_help/USAGE +16 -0
  43. data/lib/rails/commands/gem_help/gem_help_command.rb +13 -0
  44. data/lib/rails/commands/generate/generate_command.rb +2 -2
  45. data/lib/rails/commands/help/USAGE +15 -14
  46. data/lib/rails/commands/help/help_command.rb +21 -2
  47. data/lib/rails/commands/initializers/initializers_command.rb +1 -4
  48. data/lib/rails/commands/middleware/middleware_command.rb +17 -0
  49. data/lib/rails/commands/new/new_command.rb +2 -0
  50. data/lib/rails/commands/notes/notes_command.rb +2 -1
  51. data/lib/rails/commands/plugin/plugin_command.rb +2 -0
  52. data/lib/rails/commands/rake/rake_command.rb +25 -22
  53. data/lib/rails/commands/restart/restart_command.rb +14 -0
  54. data/lib/rails/commands/routes/routes_command.rb +13 -1
  55. data/lib/rails/commands/runner/USAGE +14 -12
  56. data/lib/rails/commands/runner/runner_command.rb +34 -21
  57. data/lib/rails/commands/secret/secret_command.rb +13 -0
  58. data/lib/rails/commands/secrets/USAGE +44 -49
  59. data/lib/rails/commands/secrets/secrets_command.rb +20 -38
  60. data/lib/rails/commands/server/server_command.rb +33 -30
  61. data/lib/rails/commands/test/USAGE +14 -0
  62. data/lib/rails/commands/test/test_command.rb +56 -14
  63. data/lib/rails/commands/unused_routes/unused_routes_command.rb +75 -0
  64. data/lib/rails/commands/version/version_command.rb +1 -0
  65. data/lib/rails/configuration.rb +23 -28
  66. data/lib/rails/console/app.rb +1 -4
  67. data/lib/rails/console/helpers.rb +2 -2
  68. data/lib/rails/deprecator.rb +7 -0
  69. data/lib/rails/engine/configuration.rb +53 -9
  70. data/lib/rails/engine.rb +63 -48
  71. data/lib/rails/gem_version.rb +3 -3
  72. data/lib/rails/generators/actions/create_migration.rb +2 -4
  73. data/lib/rails/generators/actions.rb +231 -73
  74. data/lib/rails/generators/active_model.rb +28 -14
  75. data/lib/rails/generators/app_base.rb +476 -176
  76. data/lib/rails/generators/app_name.rb +3 -14
  77. data/lib/rails/generators/base.rb +24 -20
  78. data/lib/rails/generators/database.rb +39 -1
  79. data/lib/rails/generators/erb/mailer/templates/layout.html.erb.tt +1 -1
  80. data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +2 -0
  81. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +8 -8
  82. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +8 -4
  83. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +11 -28
  84. data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +7 -3
  85. data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +17 -0
  86. data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +8 -17
  87. data/lib/rails/generators/erb.rb +1 -1
  88. data/lib/rails/generators/generated_attribute.rb +57 -9
  89. data/lib/rails/generators/migration.rb +2 -7
  90. data/lib/rails/generators/model_helpers.rb +3 -2
  91. data/lib/rails/generators/named_base.rb +13 -13
  92. data/lib/rails/generators/rails/app/USAGE +22 -6
  93. data/lib/rails/generators/rails/app/app_generator.rb +113 -114
  94. data/lib/rails/generators/rails/app/templates/Dockerfile.tt +103 -0
  95. data/lib/rails/generators/rails/app/templates/Gemfile.tt +43 -53
  96. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +2 -2
  97. data/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb.tt +2 -2
  98. data/lib/rails/generators/rails/app/templates/app/models/application_record.rb.tt +1 -1
  99. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +3 -9
  100. data/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +1 -1
  101. data/lib/rails/generators/rails/app/templates/bin/rails.tt +1 -4
  102. data/lib/rails/generators/rails/app/templates/bin/rake.tt +0 -3
  103. data/lib/rails/generators/rails/app/templates/bin/setup.tt +16 -12
  104. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +6 -18
  105. data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +1 -1
  106. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +2 -2
  107. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +3 -3
  108. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +7 -7
  109. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +5 -5
  110. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +3 -3
  111. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +2 -2
  112. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +7 -9
  113. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +4 -4
  114. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +5 -5
  115. data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +59 -0
  116. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +16 -12
  117. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +38 -61
  118. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +14 -15
  119. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +3 -5
  120. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +21 -28
  121. data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +3 -3
  122. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -1
  123. data/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt +4 -4
  124. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +283 -0
  125. data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +11 -9
  126. data/lib/rails/generators/rails/app/templates/config/locales/en.yml +13 -15
  127. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +12 -20
  128. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +8 -1
  129. data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +5 -5
  130. data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +6 -4
  131. data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +10 -0
  132. data/lib/rails/generators/rails/app/templates/dockerignore.tt +43 -0
  133. data/lib/rails/generators/rails/app/templates/gitattributes.tt +0 -5
  134. data/lib/rails/generators/rails/app/templates/gitignore.tt +7 -9
  135. data/lib/rails/generators/rails/app/templates/node-version.tt +1 -0
  136. data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +10 -8
  137. data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +10 -8
  138. data/lib/rails/generators/rails/application_record/application_record_generator.rb +4 -0
  139. data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +2 -1
  140. data/lib/rails/generators/rails/controller/USAGE +12 -4
  141. data/lib/rails/generators/rails/controller/controller_generator.rb +6 -2
  142. data/lib/rails/generators/rails/controller/templates/controller.rb.tt +1 -5
  143. data/lib/rails/generators/rails/credentials/credentials_generator.rb +29 -24
  144. data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +8 -0
  145. data/lib/rails/generators/rails/db/system/change/change_generator.rb +31 -1
  146. data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +1 -2
  147. data/lib/rails/generators/rails/generator/templates/%file_name%_generator.rb.tt +1 -1
  148. data/lib/rails/generators/rails/migration/USAGE +21 -11
  149. data/lib/rails/generators/rails/model/model_generator.rb +4 -0
  150. data/lib/rails/generators/rails/plugin/USAGE +17 -6
  151. data/lib/rails/generators/rails/plugin/plugin_generator.rb +69 -30
  152. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +7 -3
  153. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +9 -31
  154. data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +1 -1
  155. data/lib/rails/generators/rails/plugin/templates/README.md.tt +1 -1
  156. data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +2 -2
  157. data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +0 -3
  158. data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +5 -20
  159. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +0 -7
  160. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +2 -2
  161. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb.tt +1 -1
  162. data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +2 -2
  163. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +6 -11
  164. data/lib/rails/generators/rails/resource/resource_generator.rb +6 -0
  165. data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -20
  166. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -1
  167. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -5
  168. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +6 -10
  169. data/lib/rails/generators/resource_helpers.rb +2 -2
  170. data/lib/rails/generators/test_case.rb +2 -2
  171. data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +1 -1
  172. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +2 -2
  173. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +4 -4
  174. data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +5 -5
  175. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +7 -7
  176. data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +9 -11
  177. data/lib/rails/generators/testing/{behaviour.rb → behavior.rb} +7 -5
  178. data/lib/rails/generators.rb +14 -29
  179. data/lib/rails/health_controller.rb +55 -0
  180. data/lib/rails/info.rb +2 -2
  181. data/lib/rails/info_controller.rb +31 -13
  182. data/lib/rails/initializable.rb +1 -1
  183. data/lib/rails/mailers_controller.rb +17 -9
  184. data/lib/rails/paths.rb +14 -11
  185. data/lib/rails/rack/logger.rb +16 -15
  186. data/lib/rails/rackup/server.rb +15 -0
  187. data/lib/rails/railtie/configuration.rb +15 -3
  188. data/lib/rails/railtie.rb +54 -31
  189. data/lib/rails/ruby_version_check.rb +5 -3
  190. data/lib/rails/secrets.rb +10 -8
  191. data/lib/rails/source_annotation_extractor.rb +68 -19
  192. data/lib/rails/tasks/engine.rake +8 -8
  193. data/lib/rails/tasks/framework.rake +4 -12
  194. data/lib/rails/tasks/log.rake +1 -1
  195. data/lib/rails/tasks/misc.rake +3 -14
  196. data/lib/rails/tasks/statistics.rake +8 -5
  197. data/lib/rails/tasks/tmp.rake +13 -6
  198. data/lib/rails/tasks/yarn.rake +8 -9
  199. data/lib/rails/tasks/zeitwerk.rake +14 -42
  200. data/lib/rails/tasks.rb +0 -2
  201. data/lib/rails/templates/layouts/application.html.erb +15 -0
  202. data/lib/rails/templates/rails/mailers/email.html.erb +45 -11
  203. data/lib/rails/templates/rails/mailers/index.html.erb +14 -7
  204. data/lib/rails/templates/rails/mailers/mailer.html.erb +11 -5
  205. data/lib/rails/templates/rails/welcome/index.html.erb +65 -48
  206. data/lib/rails/test_help.rb +13 -14
  207. data/lib/rails/test_unit/line_filtering.rb +1 -1
  208. data/lib/rails/test_unit/railtie.rb +0 -4
  209. data/lib/rails/test_unit/reporter.rb +6 -2
  210. data/lib/rails/test_unit/runner.rb +45 -20
  211. data/lib/rails/test_unit/test_parser.rb +88 -0
  212. data/lib/rails/test_unit/testing.rake +18 -43
  213. data/lib/rails/testing/maintain_test_schema.rb +16 -0
  214. data/lib/rails/version.rb +1 -1
  215. data/lib/rails/welcome_controller.rb +1 -0
  216. data/lib/rails/zeitwerk_checker.rb +15 -0
  217. data/lib/rails.rb +26 -15
  218. metadata +74 -42
  219. data/RDOC_MAIN.rdoc +0 -97
  220. data/lib/rails/.DS_Store +0 -0
  221. data/lib/rails/application/dummy_erb_compiler.rb +0 -18
  222. data/lib/rails/command/spellchecker.rb +0 -57
  223. data/lib/rails/generators/css/assets/assets_generator.rb +0 -15
  224. data/lib/rails/generators/css/assets/templates/stylesheet.css +0 -4
  225. data/lib/rails/generators/css/scaffold/scaffold_generator.rb +0 -18
  226. data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +0 -6
  227. data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +0 -5
  228. data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +0 -23
  229. data/lib/rails/generators/rails/app/templates/bin/spring.tt +0 -13
  230. data/lib/rails/generators/rails/app/templates/bin/yarn.tt +0 -16
  231. data/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb.tt +0 -8
  232. data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +0 -8
  233. data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb.tt +0 -5
  234. data/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt +0 -4
  235. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +0 -67
  236. data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +0 -16
  237. data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +0 -6
  238. data/lib/rails/generators/rails/app/templates/package.json.tt +0 -11
  239. data/lib/rails/generators/rails/assets/USAGE +0 -16
  240. data/lib/rails/generators/rails/assets/assets_generator.rb +0 -26
  241. data/lib/rails/generators/rails/assets/templates/stylesheet.css +0 -4
  242. data/lib/rails/generators/rails/model/USAGE +0 -113
  243. data/lib/rails/generators/rails/scaffold/templates/scaffold.css +0 -80
  244. data/lib/rails/tasks/middleware.rake +0 -9
  245. data/lib/rails/tasks/restart.rake +0 -9
@@ -4,7 +4,7 @@ Rails.application.configure do
4
4
  # Settings specified here will take precedence over those in config/application.rb.
5
5
 
6
6
  # Code is not reloaded between requests.
7
- config.cache_classes = true
7
+ config.enable_reloading = false
8
8
 
9
9
  # Eager load code on boot. This eager loads most of Rails and
10
10
  # your application in memory, allowing both threaded web servers
@@ -13,20 +13,19 @@ Rails.application.configure do
13
13
  config.eager_load = true
14
14
 
15
15
  # Full error reports are disabled and caching is turned on.
16
- config.consider_all_requests_local = false
16
+ config.consider_all_requests_local = false
17
17
  <%- unless options.api? -%>
18
18
  config.action_controller.perform_caching = true
19
19
  <%- end -%>
20
20
 
21
- # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
22
- # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21
+ # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
22
+ # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
23
23
  # config.require_master_key = true
24
24
 
25
- # Disable serving static files from the `/public` folder by default since
26
- # Apache or NGINX already handles this.
27
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
+ # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
26
+ # config.public_file_server.enabled = false
28
27
 
29
- <%- unless options.skip_sprockets? -%>
28
+ <%- unless skip_sprockets? -%>
30
29
  # Compress CSS using a preprocessor.
31
30
  # config.assets.css_compressor = :sass
32
31
 
@@ -35,43 +34,53 @@ Rails.application.configure do
35
34
 
36
35
  <%- end -%>
37
36
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
38
- # config.asset_host = 'http://assets.example.com'
37
+ # config.asset_host = "http://assets.example.com"
39
38
 
40
39
  # Specifies the header that your server uses for sending files.
41
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
41
+ # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
43
42
 
44
43
  <%- unless skip_active_storage? -%>
45
44
  # Store uploaded files on the local file system (see config/storage.yml for options).
46
45
  config.active_storage.service = :local
47
46
 
48
47
  <%- end -%>
49
- <%- unless options[:skip_action_cable] -%>
48
+ <%- unless skip_action_cable? -%>
50
49
  # Mount Action Cable outside main process or domain.
51
50
  # config.action_cable.mount_path = nil
52
- # config.action_cable.url = 'wss://example.com/cable'
53
- # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
51
+ # config.action_cable.url = "wss://example.com/cable"
52
+ # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
54
53
 
55
54
  <%- end -%>
55
+ # Assume all access to the app is happening through a SSL-terminating reverse proxy.
56
+ # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
57
+ # config.assume_ssl = true
58
+
56
59
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
57
- # config.force_ssl = true
60
+ config.force_ssl = true
58
61
 
59
- # Include generic and useful information about system operation, but avoid logging too much
60
- # information to avoid inadvertent exposure of personally identifiable information (PII).
61
- config.log_level = :info
62
+ # Log to STDOUT by default
63
+ config.logger = ActiveSupport::Logger.new(STDOUT)
64
+ .tap { |logger| logger.formatter = ::Logger::Formatter.new }
65
+ .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
62
66
 
63
67
  # Prepend all log lines with the following tags.
64
68
  config.log_tags = [ :request_id ]
65
69
 
70
+ # Info include generic and useful information about system operation, but avoids logging too much
71
+ # information to avoid inadvertent exposure of personally identifiable information (PII). If you
72
+ # want to log everything, set the level to "debug".
73
+ config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
74
+
66
75
  # Use a different cache store in production.
67
76
  # config.cache_store = :mem_cache_store
68
77
 
69
78
  <%- unless options[:skip_active_job] -%>
70
79
  # Use a real queuing backend for Active Job (and separate queues per environment).
71
- # config.active_job.queue_adapter = :resque
80
+ # config.active_job.queue_adapter = :resque
72
81
  # config.active_job.queue_name_prefix = "<%= app_name %>_production"
73
- <%- end -%>
74
82
 
83
+ <%- end -%>
75
84
  <%- unless options.skip_action_mailer? -%>
76
85
  config.action_mailer.perform_caching = false
77
86
 
@@ -84,51 +93,19 @@ Rails.application.configure do
84
93
  # the I18n.default_locale when a translation cannot be found).
85
94
  config.i18n.fallbacks = true
86
95
 
87
- # Send deprecation notices to registered listeners.
88
- config.active_support.deprecation = :notify
89
-
90
- # Log disallowed deprecations.
91
- config.active_support.disallowed_deprecation = :log
92
-
93
- # Tell Active Support which deprecation messages to disallow.
94
- config.active_support.disallowed_deprecation_warnings = []
95
-
96
- # Use default logging formatter so that PID and timestamp are not suppressed.
97
- config.log_formatter = ::Logger::Formatter.new
98
-
99
- # Use a different logger for distributed setups.
100
- # require "syslog/logger"
101
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
102
-
103
- if ENV["RAILS_LOG_TO_STDOUT"].present?
104
- logger = ActiveSupport::Logger.new(STDOUT)
105
- logger.formatter = config.log_formatter
106
- config.logger = ActiveSupport::TaggedLogging.new(logger)
107
- end
96
+ # Don't log any deprecations.
97
+ config.active_support.report_deprecations = false
108
98
  <%- unless options.skip_active_record? -%>
109
99
 
110
100
  # Do not dump schema after migrations.
111
101
  config.active_record.dump_schema_after_migration = false
112
102
  <%- end -%>
113
103
 
114
- # Inserts middleware to perform automatic connection switching.
115
- # The `database_selector` hash is used to pass options to the DatabaseSelector
116
- # middleware. The `delay` is used to determine how long to wait after a write
117
- # to send a subsequent read to the primary.
118
- #
119
- # The `database_resolver` class is used by the middleware to determine which
120
- # database is appropriate to use based on the time delay.
121
- #
122
- # The `database_resolver_context` class is used by the middleware to set
123
- # timestamps for the last write to the primary. The resolver uses the context
124
- # class timestamps to determine how long to wait before reading from the
125
- # replica.
126
- #
127
- # By default Rails will store a last write timestamp in the session. The
128
- # DatabaseSelector middleware is designed as such you can define your own
129
- # strategy for connection switching and pass that into the middleware through
130
- # these configuration options.
131
- # config.active_record.database_selector = { delay: 2.seconds }
132
- # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
133
- # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
104
+ # Enable DNS rebinding protection and other `Host` header attacks.
105
+ # config.hosts = [
106
+ # "example.com", # Allow requests from example.com
107
+ # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
108
+ # ]
109
+ # Skip DNS rebinding protection for the default health check endpoint.
110
+ # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
134
111
  end
@@ -8,32 +8,28 @@ require "active_support/core_ext/integer/time"
8
8
  Rails.application.configure do
9
9
  # Settings specified here will take precedence over those in config/application.rb.
10
10
 
11
- <%-# Spring executes the reloaders when files change. -%>
12
- <%- if spring_install? -%>
13
- config.cache_classes = false
14
- config.action_view.cache_template_loading = true
15
- <%- else -%>
16
- config.cache_classes = true
17
- <%- end -%>
11
+ # While tests run files are not watched, reloading is not necessary.
12
+ config.enable_reloading = false
18
13
 
19
- # Do not eager load code on boot. This avoids loading your whole application
20
- # just for the purpose of running a single test. If you are using a tool that
21
- # preloads Rails for running tests, you may have to set it to true.
22
- config.eager_load = false
14
+ # Eager loading loads your entire application. When running a single test locally,
15
+ # this is usually not necessary, and can slow down your test suite. However, it's
16
+ # recommended that you enable it in continuous integration systems to ensure eager
17
+ # loading is working properly before deploying your code.
18
+ config.eager_load = ENV["CI"].present?
23
19
 
24
20
  # Configure public file server for tests with Cache-Control for performance.
25
21
  config.public_file_server.enabled = true
26
22
  config.public_file_server.headers = {
27
- 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
23
+ "Cache-Control" => "public, max-age=#{1.hour.to_i}"
28
24
  }
29
25
 
30
26
  # Show full error reports and disable caching.
31
- config.consider_all_requests_local = true
27
+ config.consider_all_requests_local = true
32
28
  config.action_controller.perform_caching = false
33
29
  config.cache_store = :null_store
34
30
 
35
- # Raise exceptions instead of rendering exception templates.
36
- config.action_dispatch.show_exceptions = false
31
+ # Render exception templates for rescuable exceptions and raise for other exceptions.
32
+ config.action_dispatch.show_exceptions = :rescuable
37
33
 
38
34
  # Disable request forgery protection in test environment.
39
35
  config.action_controller.allow_forgery_protection = false
@@ -66,4 +62,7 @@ Rails.application.configure do
66
62
 
67
63
  # Annotate rendered view with file names.
68
64
  # config.action_view.annotate_rendered_view_with_filenames = true
65
+
66
+ # Raise error when a before_action's only/except options reference missing actions
67
+ config.action_controller.raise_on_missing_callback_actions = true
69
68
  end
@@ -1,16 +1,14 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
4
+ Rails.application.config.assets.version = "1.0"
5
5
 
6
6
  # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
- <%- unless options[:skip_javascript] -%>
9
- # Add Yarn node_modules folder to the asset load path.
10
- Rails.application.config.assets.paths << Rails.root.join('node_modules')
11
- <%- end -%>
8
+ <% if options[:asset_pipeline] == "sprockets" -%>
12
9
 
13
10
  # Precompile additional assets.
14
11
  # application.js, application.css, and all non-JS/CSS in the app/assets
15
12
  # folder are already added.
16
13
  # Rails.application.config.assets.precompile += %w( admin.js admin.css )
14
+ <% end -%>
@@ -1,32 +1,25 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Define an application-wide content security policy
4
- # For further information see the following documentation
5
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
6
 
7
- # Rails.application.config.content_security_policy do |policy|
8
- # policy.default_src :self, :https
9
- # policy.font_src :self, :https, :data
10
- # policy.img_src :self, :https, :data
11
- # policy.object_src :none
12
- # policy.script_src :self, :https
13
- # policy.style_src :self, :https
14
- <%- unless options[:skip_javascript] -%>
15
- # # If you are using webpack-dev-server then specify webpack-dev-server host
16
- # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
17
- <%- end -%>
18
-
19
- # # Specify URI for violation reports
20
- # # policy.report_uri "/csp-violation-report-endpoint"
7
+ # Rails.application.configure do
8
+ # config.content_security_policy do |policy|
9
+ # policy.default_src :self, :https
10
+ # policy.font_src :self, :https, :data
11
+ # policy.img_src :self, :https, :data
12
+ # policy.object_src :none
13
+ # policy.script_src :self, :https
14
+ # policy.style_src :self, :https
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+ #
19
+ # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
20
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
+ # config.content_security_policy_nonce_directives = %w(script-src style-src)
22
+ #
23
+ # # Report violations without enforcing the policy.
24
+ # # config.content_security_policy_report_only = true
21
25
  # end
22
-
23
- # If you are using UJS then enable automatic nonce generation
24
- # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
25
-
26
- # Set the nonce only to specific directives
27
- # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
28
-
29
- # Report CSP violations to a specified URI
30
- # For further information see the following documentation:
31
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
32
- # Rails.application.config.content_security_policy_report_only = true
@@ -1,15 +1,15 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Avoid CORS issues when API is called from the frontend app.
4
- # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
4
+ # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests.
5
5
 
6
6
  # Read more: https://github.com/cyu/rack-cors
7
7
 
8
8
  # Rails.application.config.middleware.insert_before 0, Rack::Cors do
9
9
  # allow do
10
- # origins 'example.com'
10
+ # origins "example.com"
11
11
  #
12
- # resource '*',
12
+ # resource "*",
13
13
  # headers: :any,
14
14
  # methods: [:get, :post, :put, :patch, :delete, :options, :head]
15
15
  # end
@@ -1,6 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Configure sensitive parameters which will be filtered from the log file.
3
+ # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
4
+ # Use this to limit dissemination of sensitive information.
5
+ # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
4
6
  Rails.application.config.filter_parameters += [
5
7
  :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
6
8
  ]
@@ -4,13 +4,13 @@
4
4
  # are locale specific, and you may define rules for as many different
5
5
  # locales as you wish. All of these examples are active by default:
6
6
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
7
+ # inflect.plural /^(ox)$/i, "\\1en"
8
+ # inflect.singular /^(ox)en/i, "\\1"
9
+ # inflect.irregular "person", "people"
10
10
  # inflect.uncountable %w( fish sheep )
11
11
  # end
12
12
 
13
13
  # These inflection rules are supported but not enabled by default:
14
14
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
15
+ # inflect.acronym "RESTful"
16
16
  # end
@@ -0,0 +1,283 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file eases your Rails 7.1 framework defaults upgrade.
4
+ #
5
+ # Uncomment each configuration one by one to switch to the new default.
6
+ # Once your application is ready to run with all new defaults, you can remove
7
+ # this file and set the `config.load_defaults` to `7.1`.
8
+ #
9
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10
+ # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11
+
12
+ ###
13
+ # No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able
14
+ # to manually require files that are managed by the autoloader, which you shouldn't do anyway.
15
+ #
16
+ # This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size
17
+ # of the bootsnap cache if you use it.
18
+ #++
19
+ # Rails.application.config.add_autoload_paths_to_load_path = false
20
+
21
+ ###
22
+ # Remove the default X-Download-Options headers since it is used only by Internet Explorer.
23
+ # If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`.
24
+ #++
25
+ # Rails.application.config.action_dispatch.default_headers = {
26
+ # "X-Frame-Options" => "SAMEORIGIN",
27
+ # "X-XSS-Protection" => "0",
28
+ # "X-Content-Type-Options" => "nosniff",
29
+ # "X-Permitted-Cross-Domain-Policies" => "none",
30
+ # "Referrer-Policy" => "strict-origin-when-cross-origin"
31
+ # }
32
+
33
+ ###
34
+ # Do not treat an `ActionController::Parameters` instance
35
+ # as equal to an equivalent `Hash` by default.
36
+ #++
37
+ # Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false
38
+
39
+ ###
40
+ # Active Record Encryption now uses SHA-256 as its hash digest algorithm.
41
+ #
42
+ # There are 3 scenarios to consider.
43
+ #
44
+ # 1. If you have data encrypted with previous Rails versions, and you have
45
+ # +config.active_support.key_generator_hash_digest_class+ configured as SHA1 (the default
46
+ # before Rails 7.0), you need to configure SHA-1 for Active Record Encryption too:
47
+ #++
48
+ # Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA1
49
+ #
50
+ # 2. If you have +config.active_support.key_generator_hash_digest_class+ configured as SHA256 (the new default
51
+ # in 7.0), then you need to configure SHA-256 for Active Record Encryption:
52
+ #++
53
+ # Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
54
+ #
55
+ # 3. If you don't currently have data encrypted with Active Record encryption, you can disable this setting to
56
+ # configure the default behavior starting 7.1+:
57
+ #++
58
+ # Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false
59
+
60
+ ###
61
+ # No longer run after_commit callbacks on the first of multiple Active Record
62
+ # instances to save changes to the same database row within a transaction.
63
+ # Instead, run these callbacks on the instance most likely to have internal
64
+ # state which matches what was committed to the database, typically the last
65
+ # instance to save.
66
+ #++
67
+ # Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false
68
+
69
+ ###
70
+ # Configures SQLite with a strict strings mode, which disables double-quoted string literals.
71
+ #
72
+ # SQLite has some quirks around double-quoted string literals.
73
+ # It first tries to consider double-quoted strings as identifier names, but if they don't exist
74
+ # it then considers them as string literals. Because of this, typos can silently go unnoticed.
75
+ # For example, it is possible to create an index for a non existing column.
76
+ # See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details.
77
+ #++
78
+ # Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true
79
+
80
+ ###
81
+ # Disable deprecated singular associations names.
82
+ #++
83
+ # Rails.application.config.active_record.allow_deprecated_singular_associations_name = false
84
+
85
+ ###
86
+ # Enable the Active Job `BigDecimal` argument serializer, which guarantees
87
+ # roundtripping. Without this serializer, some queue adapters may serialize
88
+ # `BigDecimal` arguments as simple (non-roundtrippable) strings.
89
+ #
90
+ # When deploying an application with multiple replicas, old (pre-Rails 7.1)
91
+ # replicas will not be able to deserialize `BigDecimal` arguments from this
92
+ # serializer. Therefore, this setting should only be enabled after all replicas
93
+ # have been successfully upgraded to Rails 7.1.
94
+ #++
95
+ # Rails.application.config.active_job.use_big_decimal_serializer = true
96
+
97
+ ###
98
+ # Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or
99
+ # `write` are given an invalid `expires_at` or `expires_in` time.
100
+ # Options are `true`, and `false`. If `false`, the exception will be reported
101
+ # as `handled` and logged instead.
102
+ #++
103
+ # Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true
104
+
105
+ ###
106
+ # Specify whether Query Logs will format tags using the SQLCommenter format
107
+ # (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format.
108
+ # Options are `:legacy` and `:sqlcommenter`.
109
+ #++
110
+ # Rails.application.config.active_record.query_log_tags_format = :sqlcommenter
111
+
112
+ ###
113
+ # Specify the default serializer used by `MessageEncryptor` and `MessageVerifier`
114
+ # instances.
115
+ #
116
+ # The legacy default is `:marshal`, which is a potential vector for
117
+ # deserialization attacks in cases where a message signing secret has been
118
+ # leaked.
119
+ #
120
+ # In Rails 7.1, the new default is `:json_allow_marshal` which serializes and
121
+ # deserializes with `ActiveSupport::JSON`, but can fall back to deserializing
122
+ # with `Marshal` so that legacy messages can still be read.
123
+ #
124
+ # In Rails 7.2, the default will become `:json` which serializes and
125
+ # deserializes with `ActiveSupport::JSON` only.
126
+ #
127
+ # Alternatively, you can choose `:message_pack` or `:message_pack_allow_marshal`,
128
+ # which serialize with `ActiveSupport::MessagePack`. `ActiveSupport::MessagePack`
129
+ # can roundtrip some Ruby types that are not supported by JSON, and may provide
130
+ # improved performance, but it requires the `msgpack` gem.
131
+ #
132
+ # For more information, see
133
+ # https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-message-serializer
134
+ #
135
+ # If you are performing a rolling deploy of a Rails 7.1 upgrade, wherein servers
136
+ # that have not yet been upgraded must be able to read messages from upgraded
137
+ # servers, first deploy without changing the serializer, then set the serializer
138
+ # in a subsequent deploy.
139
+ #++
140
+ # Rails.application.config.active_support.message_serializer = :json_allow_marshal
141
+
142
+ ###
143
+ # Enable a performance optimization that serializes message data and metadata
144
+ # together. This changes the message format, so messages serialized this way
145
+ # cannot be read by older versions of Rails. However, messages that use the old
146
+ # format can still be read, regardless of whether this optimization is enabled.
147
+ #
148
+ # To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
149
+ # not yet been upgraded must be able to read messages from upgraded servers,
150
+ # leave this optimization off on the first deploy, then enable it on a
151
+ # subsequent deploy.
152
+ #++
153
+ # Rails.application.config.active_support.use_message_serializer_for_metadata = true
154
+
155
+ ###
156
+ # Set the maximum size for Rails log files.
157
+ #
158
+ # `config.load_defaults 7.1` does not set this value for environments other than
159
+ # development and test.
160
+ #++
161
+ # if Rails.env.local?
162
+ # Rails.application.config.log_file_size = 100 * 1024 * 1024
163
+ # end
164
+
165
+ ###
166
+ # Enable raising on assignment to attr_readonly attributes. The previous
167
+ # behavior would allow assignment but silently not persist changes to the
168
+ # database.
169
+ #++
170
+ # Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true
171
+
172
+ ###
173
+ # Enable validating only parent-related columns for presence when the parent is mandatory.
174
+ # The previous behavior was to validate the presence of the parent record, which performed an extra query
175
+ # to get the parent every time the child record was updated, even when parent has not changed.
176
+ #++
177
+ # Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false
178
+
179
+ ###
180
+ # Enable precompilation of `config.filter_parameters`. Precompilation can
181
+ # improve filtering performance, depending on the quantity and types of filters.
182
+ #++
183
+ # Rails.application.config.precompile_filter_parameters = true
184
+
185
+ ###
186
+ # Enable before_committed! callbacks on all enrolled records in a transaction.
187
+ # The previous behavior was to only run the callbacks on the first copy of a record
188
+ # if there were multiple copies of the same record enrolled in the transaction.
189
+ #++
190
+ # Rails.application.config.active_record.before_committed_on_all_records = true
191
+
192
+ ###
193
+ # Disable automatic column serialization into YAML.
194
+ # To keep the historic behavior, you can set it to `YAML`, however it is
195
+ # recommended to explicitly define the serialization method for each column
196
+ # rather than to rely on a global default.
197
+ #++
198
+ # Rails.application.config.active_record.default_column_serializer = nil
199
+
200
+ ###
201
+ # Enable a performance optimization that serializes Active Record models
202
+ # in a faster and more compact way.
203
+ #
204
+ # To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
205
+ # not yet been upgraded must be able to read caches from upgraded servers,
206
+ # leave this optimization off on the first deploy, then enable it on a
207
+ # subsequent deploy.
208
+ #++
209
+ # Rails.application.config.active_record.marshalling_format_version = 7.1
210
+
211
+ ###
212
+ # Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model.
213
+ # This matches the behaviour of all other callbacks.
214
+ # In previous versions of Rails, they ran in the inverse order.
215
+ #++
216
+ # Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true
217
+
218
+ ###
219
+ # Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
220
+ #++
221
+ # Rails.application.config.active_record.commit_transaction_on_non_local_return = true
222
+
223
+ ###
224
+ # Controls when to generate a value for <tt>has_secure_token</tt> declarations.
225
+ #++
226
+ # Rails.application.config.active_record.generate_secure_token_on = :initialize
227
+
228
+ ###
229
+ # ** Please read carefully, this must be configured in config/application.rb **
230
+ #
231
+ # Change the format of the cache entry.
232
+ #
233
+ # Changing this default means that all new cache entries added to the cache
234
+ # will have a different format that is not supported by Rails 7.0
235
+ # applications.
236
+ #
237
+ # Only change this value after your application is fully deployed to Rails 7.1
238
+ # and you have no plans to rollback.
239
+ # When you're ready to change format, add this to `config/application.rb` (NOT
240
+ # this file):
241
+ # config.active_support.cache_format_version = 7.1
242
+
243
+
244
+ ###
245
+ # Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your
246
+ # platform.
247
+ #
248
+ # `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action View to use HTML5-compliant
249
+ # sanitizers if they are supported, else fall back to HTML4 sanitizers.
250
+ #
251
+ # In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor.
252
+ #++
253
+ # Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
254
+
255
+
256
+ ###
257
+ # Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
258
+ # platform.
259
+ #
260
+ # `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action Text to use HTML5-compliant
261
+ # sanitizers if they are supported, else fall back to HTML4 sanitizers.
262
+ #
263
+ # In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor.
264
+ #++
265
+ # Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
266
+
267
+
268
+ ###
269
+ # Configure the log level used by the DebugExceptions middleware when logging
270
+ # uncaught exceptions during requests.
271
+ #++
272
+ # Rails.application.config.action_dispatch.debug_exception_log_level = :error
273
+
274
+
275
+ ###
276
+ # Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
277
+ # parsers.
278
+ #
279
+ # Nokogiri::HTML5 isn't supported on JRuby, so JRuby applications must set this to :html4.
280
+ #
281
+ # In previous versions of Rails, these test helpers always used an HTML4 parser.
282
+ #++
283
+ # Rails.application.config.dom_testing_default_html_version = :html5
@@ -1,11 +1,13 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
1
3
  # Define an application-wide HTTP permissions policy. For further
2
- # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
- #
4
- # Rails.application.config.permissions_policy do |f|
5
- # f.camera :none
6
- # f.gyroscope :none
7
- # f.microphone :none
8
- # f.usb :none
9
- # f.fullscreen :self
10
- # f.payment :self, "https://secure.example.com"
4
+ # information see: https://developers.google.com/web/updates/2018/06/feature-policy
5
+
6
+ # Rails.application.config.permissions_policy do |policy|
7
+ # policy.camera :none
8
+ # policy.gyroscope :none
9
+ # policy.microphone :none
10
+ # policy.usb :none
11
+ # policy.fullscreen :self
12
+ # policy.payment :self, "https://secure.example.com"
11
13
  # end