railties 5.2.8.1 → 6.1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +298 -159
  3. data/MIT-LICENSE +1 -1
  4. data/RDOC_MAIN.rdoc +39 -33
  5. data/README.rdoc +3 -3
  6. data/lib/minitest/rails_plugin.rb +23 -12
  7. data/lib/rails/all.rb +4 -0
  8. data/lib/rails/api/generator.rb +2 -1
  9. data/lib/rails/api/task.rb +18 -1
  10. data/lib/rails/app_loader.rb +2 -2
  11. data/lib/rails/app_updater.rb +3 -1
  12. data/lib/rails/application/bootstrap.rb +9 -17
  13. data/lib/rails/application/configuration.rb +184 -26
  14. data/lib/rails/application/default_middleware_stack.rb +7 -3
  15. data/lib/rails/application/dummy_erb_compiler.rb +18 -0
  16. data/lib/rails/application/finisher.rb +68 -1
  17. data/lib/rails/application/routes_reloader.rb +9 -3
  18. data/lib/rails/application.rb +86 -65
  19. data/lib/rails/application_controller.rb +0 -1
  20. data/lib/rails/autoloaders.rb +48 -0
  21. data/lib/rails/backtrace_cleaner.rb +14 -21
  22. data/lib/rails/code_statistics.rb +8 -6
  23. data/lib/rails/code_statistics_calculator.rb +6 -6
  24. data/lib/rails/command/base.rb +13 -5
  25. data/lib/rails/command/behavior.rb +8 -49
  26. data/lib/rails/command/environment_argument.rb +9 -16
  27. data/lib/rails/command/spellchecker.rb +57 -0
  28. data/lib/rails/command.rb +16 -11
  29. data/lib/rails/commands/console/console_command.rb +6 -0
  30. data/lib/rails/commands/credentials/USAGE +33 -0
  31. data/lib/rails/commands/credentials/credentials_command/diffing.rb +41 -0
  32. data/lib/rails/commands/credentials/credentials_command.rb +78 -20
  33. data/lib/rails/commands/db/system/change/change_command.rb +25 -0
  34. data/lib/rails/commands/dbconsole/dbconsole_command.rb +69 -51
  35. data/lib/rails/commands/dev/dev_command.rb +19 -0
  36. data/lib/rails/commands/encrypted/USAGE +1 -1
  37. data/lib/rails/commands/encrypted/encrypted_command.rb +4 -4
  38. data/lib/rails/commands/generate/generate_command.rb +1 -1
  39. data/lib/rails/commands/help/help_command.rb +1 -1
  40. data/lib/rails/commands/initializers/initializers_command.rb +23 -0
  41. data/lib/rails/commands/new/new_command.rb +2 -2
  42. data/lib/rails/commands/notes/notes_command.rb +29 -0
  43. data/lib/rails/commands/plugin/plugin_command.rb +1 -1
  44. data/lib/rails/commands/rake/rake_command.rb +9 -8
  45. data/lib/rails/commands/routes/routes_command.rb +37 -0
  46. data/lib/rails/commands/runner/runner_command.rb +13 -9
  47. data/lib/rails/commands/secrets/USAGE +6 -0
  48. data/lib/rails/commands/secrets/secrets_command.rb +3 -3
  49. data/lib/rails/commands/server/server_command.rb +92 -56
  50. data/lib/rails/commands/test/test_command.rb +2 -2
  51. data/lib/rails/configuration.rb +48 -19
  52. data/lib/rails/engine/configuration.rb +6 -2
  53. data/lib/rails/engine/updater.rb +1 -1
  54. data/lib/rails/engine.rb +59 -49
  55. data/lib/rails/gem_version.rb +3 -3
  56. data/lib/rails/generators/actions/create_migration.rb +7 -1
  57. data/lib/rails/generators/actions.rb +89 -56
  58. data/lib/rails/generators/app_base.rb +90 -106
  59. data/lib/rails/generators/app_name.rb +50 -0
  60. data/lib/rails/generators/base.rb +15 -12
  61. data/lib/rails/generators/database.rb +57 -0
  62. data/lib/rails/generators/erb/mailer/mailer_generator.rb +1 -2
  63. data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +0 -1
  64. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +7 -4
  65. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +1 -1
  66. data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +9 -1
  67. data/lib/rails/generators/erb.rb +0 -1
  68. data/lib/rails/generators/generated_attribute.rb +50 -31
  69. data/lib/rails/generators/migration.rb +3 -3
  70. data/lib/rails/generators/model_helpers.rb +33 -2
  71. data/lib/rails/generators/named_base.rb +3 -7
  72. data/lib/rails/generators/rails/app/USAGE +2 -1
  73. data/lib/rails/generators/rails/app/app_generator.rb +120 -84
  74. data/lib/rails/generators/rails/app/templates/Gemfile.tt +18 -21
  75. data/lib/rails/generators/rails/app/templates/Rakefile.tt +1 -1
  76. data/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +0 -3
  77. data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +6 -0
  78. data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +5 -0
  79. data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +23 -0
  80. data/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt +5 -0
  81. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +6 -5
  82. data/lib/rails/generators/rails/app/templates/bin/rails.tt +5 -2
  83. data/lib/rails/generators/rails/app/templates/bin/rake.tt +5 -2
  84. data/lib/rails/generators/rails/app/templates/bin/setup.tt +9 -9
  85. data/lib/rails/generators/rails/app/templates/bin/spring.tt +13 -0
  86. data/lib/rails/generators/rails/app/templates/bin/yarn.tt +9 -3
  87. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +16 -7
  88. data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +2 -2
  89. data/lib/rails/generators/rails/app/templates/config/cable.yml.tt +1 -1
  90. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +4 -5
  91. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +12 -11
  92. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +13 -12
  93. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +1 -1
  94. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +13 -12
  95. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +12 -11
  96. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +16 -15
  97. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
  98. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +11 -10
  99. data/lib/rails/generators/rails/app/templates/config/environment.rb.tt +1 -1
  100. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +22 -5
  101. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +43 -17
  102. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +26 -7
  103. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +1 -1
  104. data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +4 -3
  105. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +7 -0
  106. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -1
  107. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +67 -0
  108. data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +11 -0
  109. data/lib/rails/generators/rails/app/templates/config/locales/en.yml +1 -1
  110. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +10 -4
  111. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +1 -1
  112. data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +6 -6
  113. data/lib/rails/generators/rails/app/templates/config.ru.tt +2 -1
  114. data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +1 -1
  115. data/lib/rails/generators/rails/app/templates/gitattributes.tt +14 -0
  116. data/lib/rails/generators/rails/app/templates/gitignore.tt +8 -8
  117. data/lib/rails/generators/rails/app/templates/package.json.tt +8 -2
  118. data/lib/rails/generators/rails/app/templates/public/robots.txt +1 -1
  119. data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
  120. data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +11 -0
  121. data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +9 -2
  122. data/lib/rails/generators/rails/assets/USAGE +3 -7
  123. data/lib/rails/generators/rails/assets/assets_generator.rb +0 -1
  124. data/lib/rails/generators/rails/benchmark/USAGE +19 -0
  125. data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +29 -0
  126. data/lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt +15 -0
  127. data/lib/rails/generators/rails/controller/USAGE +2 -2
  128. data/lib/rails/generators/rails/controller/controller_generator.rb +10 -39
  129. data/lib/rails/generators/rails/credentials/credentials_generator.rb +6 -7
  130. data/lib/rails/generators/rails/db/system/change/change_generator.rb +65 -0
  131. data/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb +10 -7
  132. data/lib/rails/generators/rails/generator/USAGE +2 -2
  133. data/lib/rails/generators/rails/generator/generator_generator.rb +0 -1
  134. data/lib/rails/generators/rails/generator/templates/USAGE.tt +1 -1
  135. data/lib/rails/generators/rails/helper/USAGE +2 -3
  136. data/lib/rails/generators/rails/helper/helper_generator.rb +5 -0
  137. data/lib/rails/generators/rails/integration_test/USAGE +2 -2
  138. data/lib/rails/generators/rails/migration/USAGE +4 -4
  139. data/lib/rails/generators/rails/model/USAGE +15 -16
  140. data/lib/rails/generators/rails/plugin/plugin_generator.rb +33 -56
  141. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +10 -19
  142. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +3 -10
  143. data/lib/rails/generators/rails/plugin/templates/Rakefile.tt +4 -18
  144. data/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +1 -2
  145. data/lib/rails/generators/rails/plugin/templates/app/helpers/%namespaced_name%/application_helper.rb.tt +1 -1
  146. data/lib/rails/generators/rails/plugin/templates/app/jobs/%namespaced_name%/application_job.rb.tt +1 -1
  147. data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +1 -1
  148. data/lib/rails/generators/rails/plugin/templates/app/models/%namespaced_name%/application_record.rb.tt +1 -1
  149. data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +3 -3
  150. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +14 -11
  151. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +1 -1
  152. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/railtie.rb.tt +1 -1
  153. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb.tt +1 -0
  154. data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +1 -1
  155. data/lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb.tt +4 -4
  156. data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb.tt +1 -1
  157. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +0 -4
  158. data/lib/rails/generators/rails/resource/USAGE +4 -4
  159. data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +2 -27
  160. data/lib/rails/generators/rails/scaffold/USAGE +5 -5
  161. data/lib/rails/generators/rails/scaffold_controller/USAGE +2 -2
  162. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +19 -0
  163. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +2 -2
  164. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +2 -2
  165. data/lib/rails/generators/rails/system_test/USAGE +2 -2
  166. data/lib/rails/generators/rails/task/USAGE +3 -3
  167. data/lib/rails/generators/resource_helpers.rb +1 -6
  168. data/lib/rails/generators/test_case.rb +1 -1
  169. data/lib/rails/generators/test_unit/controller/controller_generator.rb +2 -0
  170. data/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt +3 -3
  171. data/lib/rails/generators/test_unit/generator/generator_generator.rb +0 -1
  172. data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +2 -2
  173. data/lib/rails/generators/test_unit/integration/integration_generator.rb +5 -0
  174. data/lib/rails/generators/test_unit/integration/templates/integration_test.rb.tt +1 -1
  175. data/lib/rails/generators/test_unit/job/job_generator.rb +5 -0
  176. data/lib/rails/generators/test_unit/job/templates/unit_test.rb.tt +1 -1
  177. data/lib/rails/generators/test_unit/mailer/mailer_generator.rb +1 -1
  178. data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb.tt +1 -1
  179. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +3 -3
  180. data/lib/rails/generators/test_unit/model/templates/unit_test.rb.tt +1 -1
  181. data/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +1 -1
  182. data/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +2 -2
  183. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +8 -4
  184. data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +1 -1
  185. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +1 -1
  186. data/lib/rails/generators/test_unit/system/system_generator.rb +5 -0
  187. data/lib/rails/generators/testing/assertions.rb +2 -2
  188. data/lib/rails/generators/testing/behaviour.rb +4 -2
  189. data/lib/rails/generators.rb +38 -24
  190. data/lib/rails/info.rb +4 -4
  191. data/lib/rails/info_controller.rb +2 -3
  192. data/lib/rails/mailers_controller.rb +8 -4
  193. data/lib/rails/paths.rb +26 -10
  194. data/lib/rails/rack/logger.rb +1 -2
  195. data/lib/rails/railtie/configurable.rb +0 -1
  196. data/lib/rails/railtie/configuration.rb +3 -3
  197. data/lib/rails/railtie.rb +33 -13
  198. data/lib/rails/ruby_version_check.rb +3 -3
  199. data/lib/rails/secrets.rb +4 -2
  200. data/lib/rails/source_annotation_extractor.rb +124 -117
  201. data/lib/rails/tasks/engine.rake +1 -4
  202. data/lib/rails/tasks/framework.rake +12 -2
  203. data/lib/rails/tasks/log.rake +0 -1
  204. data/lib/rails/tasks/misc.rake +1 -1
  205. data/lib/rails/tasks/statistics.rake +5 -1
  206. data/lib/rails/tasks/yarn.rake +14 -2
  207. data/lib/rails/tasks/zeitwerk.rake +69 -0
  208. data/lib/rails/tasks.rb +1 -4
  209. data/lib/rails/templates/rails/mailers/email.html.erb +1 -0
  210. data/lib/rails/templates/rails/welcome/index.html.erb +3 -3
  211. data/lib/rails/test_help.rb +11 -9
  212. data/lib/rails/test_unit/reporter.rb +3 -2
  213. data/lib/rails/test_unit/runner.rb +25 -8
  214. data/lib/rails/test_unit/testing.rake +7 -1
  215. data/lib/rails.rb +10 -8
  216. metadata +45 -38
  217. data/lib/rails/generators/js/assets/assets_generator.rb +0 -15
  218. data/lib/rails/generators/js/assets/templates/javascript.js +0 -2
  219. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +0 -22
  220. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.js.tt +0 -13
  221. data/lib/rails/generators/rails/app/templates/bin/bundle.tt +0 -2
  222. data/lib/rails/generators/rails/app/templates/bin/update.tt +0 -34
  223. data/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt +0 -50
  224. data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt +0 -86
  225. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_5_2.rb.tt +0 -38
  226. data/lib/rails/generators/rails/assets/templates/javascript.js +0 -2
  227. data/lib/rails/generators/rails/plugin/templates/rails/application.rb.tt +0 -23
  228. data/lib/rails/tasks/annotations.rake +0 -22
  229. data/lib/rails/tasks/dev.rake +0 -10
  230. data/lib/rails/tasks/initializers.rake +0 -8
  231. data/lib/rails/tasks/routes.rake +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2355619d5965ed023eee3215ae3442cd7557f707c3d96a15e65462f9a2daaba2
4
- data.tar.gz: 9dbee91ea9dfff32b89a73b96fe7c448736cabc2cc87fcbef491a7f1b7df8fd7
3
+ metadata.gz: e57c446c28cf1a0037c9d57ad1d25adac9e02081282799d44ccf27224f74bcd6
4
+ data.tar.gz: 7b1ed0cb23743f29cceaa99ae4bdc27d59c482b02e2c99245b7eb3ce455e42b4
5
5
  SHA512:
6
- metadata.gz: 4e0aa6c0822c53a195d181ad608bf80c861bf223a9fb2c93a0bd30815dca41f2683202a5afbdd93aa869f22218f9b41ddb8775ad600ea4a4d503518630e6280a
7
- data.tar.gz: a1fb2d33d4d4fb27641094aa01527962ad0a08706cc274b46956477562cacf130f1faf9fedb276ff876e0fa8d6aaae74e029bcdf71734eca645091a3fc5a04f9
6
+ metadata.gz: b5d96ce1e21ed475cf967fba65c7942ae8a43affefeb8d3a501f501c13e28bb6ff0f4364e79611bcd12281c2e0a13b87299fc8a52d1fb7bb63f96a17e179ff92
7
+ data.tar.gz: 653876085464dab816850e20fb3cbef1500a8c5d0dc3e7b77f565b2550005945120066bac77e8897b2add9751c542edfd9de375b34126a4f85dc26f45474a7d4
data/CHANGELOG.md CHANGED
@@ -1,350 +1,489 @@
1
- ## Rails 5.2.8.1 (July 12, 2022) ##
1
+ ## Rails 6.1.6.1 (July 12, 2022) ##
2
2
 
3
3
  * No changes.
4
4
 
5
5
 
6
- ## Rails 5.2.8 (May 09, 2022) ##
6
+ ## Rails 6.1.5.1 (April 26, 2022) ##
7
7
 
8
8
  * No changes.
9
9
 
10
10
 
11
- ## Rails 5.2.7.1 (April 26, 2022) ##
11
+ ## Rails 6.1.5 (March 09, 2022) ##
12
12
 
13
- * No changes.
13
+ * In `zeitwerk` mode, setup the `once` autoloader first, and the `main` autoloader after it.
14
+ This order plays better with shared namespaces.
14
15
 
16
+ *Xavier Noria*
15
17
 
16
- ## Rails 5.2.7 (March 10, 2022) ##
18
+ * Handle paths with spaces when editing credentials.
17
19
 
18
- * No changes.
20
+ *Alex Ghiculescu*
21
+
22
+ * Support Psych 4 when loading secrets.
19
23
 
24
+ *Nat Morcos*
20
25
 
21
- ## Rails 5.2.6.3 (March 08, 2022) ##
26
+
27
+ ## Rails 6.1.4.7 (March 08, 2022) ##
22
28
 
23
29
  * No changes.
24
30
 
25
31
 
26
- ## Rails 5.2.6.2 (February 11, 2022) ##
32
+ ## Rails 6.1.4.6 (February 11, 2022) ##
27
33
 
28
34
  * No changes.
29
35
 
30
36
 
31
- ## Rails 5.2.6.1 (February 11, 2022) ##
37
+ ## Rails 6.1.4.5 (February 11, 2022) ##
32
38
 
33
39
  * No changes.
34
40
 
35
41
 
36
- ## Rails 5.2.6 (May 05, 2021) ##
42
+ ## Rails 6.1.4.4 (December 15, 2021) ##
37
43
 
38
44
  * No changes.
39
45
 
40
46
 
41
- ## Rails 5.2.5 (March 26, 2021) ##
47
+ ## Rails 6.1.4.3 (December 14, 2021) ##
48
+
49
+ * Allow localhost with a port by default in development
50
+
51
+ [Fixes: #43864]
52
+
53
+ ## Rails 6.1.4.2 (December 14, 2021) ##
42
54
 
43
55
  * No changes.
44
56
 
45
57
 
46
- ## Rails 5.2.4.6 (May 05, 2021) ##
58
+ ## Rails 6.1.4.1 (August 19, 2021) ##
47
59
 
48
60
  * No changes.
49
61
 
50
62
 
51
- ## Rails 5.2.4.5 (February 10, 2021) ##
63
+ ## Rails 6.1.4 (June 24, 2021) ##
64
+
65
+ * Fix compatibility with `psych >= 4`.
66
+
67
+ Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
68
+ `Rails.application.config_for` now uses `YAML.unsafe_load` if available.
69
+
70
+ *Jean Boussier*
71
+
72
+ * Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
73
+
74
+ *Jean Boussier*
75
+
76
+ * Fix create migration generator with `--pretend` option.
77
+
78
+ *euxx*
79
+
80
+
81
+ ## Rails 6.1.3.2 (May 05, 2021) ##
52
82
 
53
83
  * No changes.
54
84
 
55
85
 
56
- ## Rails 5.2.4.4 (September 09, 2020) ##
86
+ ## Rails 6.1.3.1 (March 26, 2021) ##
57
87
 
58
88
  * No changes.
59
89
 
60
90
 
61
- ## Rails 5.2.4.3 (May 18, 2020) ##
91
+ ## Rails 6.1.3 (February 17, 2021) ##
62
92
 
63
93
  * No changes.
64
94
 
65
95
 
66
- ## Rails 5.2.4.2 (March 19, 2020) ##
96
+ ## Rails 6.1.2.1 (February 10, 2021) ##
67
97
 
68
98
  * No changes.
69
99
 
70
100
 
71
- ## Rails 5.2.4.1 (December 18, 2019) ##
101
+ ## Rails 6.1.2 (February 09, 2021) ##
72
102
 
73
103
  * No changes.
74
104
 
75
105
 
76
- ## Rails 5.2.4 (November 27, 2019) ##
106
+ ## Rails 6.1.1 (January 07, 2021) ##
77
107
 
78
- * Use original `bundler` environment variables during the process of generating a new rails project.
108
+ * Allow spaces in path to Yarn binstub and only run on precompile if needed.
79
109
 
80
- *Marco Costa*
110
+ *Markus Doits*
81
111
 
82
- * Allow loading seeds without ActiveJob.
112
+ * Populate ARGV for app template.
83
113
 
84
- Fixes #35782
114
+ Fixes #40945.
85
115
 
86
- *Jeremy Weathers*
116
+ *Jonathan Hefner*
87
117
 
88
- * Only force `:async` ActiveJob adapter to `:inline` during seeding.
89
118
 
90
- *BatedUrGonnaDie*
119
+ ## Rails 6.1.0 (December 09, 2020) ##
91
120
 
121
+ * Added `Railtie#server` hook called when Rails starts a server.
122
+ This is useful in case your application or a library needs to run
123
+ another process next to the Rails server. This is quite common in development
124
+ for instance to run the Webpack or the React server.
92
125
 
93
- ## Rails 5.2.3 (March 27, 2019) ##
126
+ It can be used like this:
94
127
 
95
- * Seed database with inline ActiveJob job adapter.
128
+ ```ruby
129
+ class MyRailtie < Rails::Railtie
130
+ server do
131
+ WebpackServer.run
132
+ end
133
+ end
134
+ ```
96
135
 
97
- *Gannon McGibbon*
136
+ *Edouard Chin*
98
137
 
99
- * Fix boolean interaction in scaffold system tests.
138
+ * Remove deprecated `rake dev:cache` tasks.
100
139
 
101
- *Gannon McGibbon*
140
+ *Rafael Mendonça França*
102
141
 
142
+ * Remove deprecated `rake routes` tasks.
103
143
 
104
- ## Rails 5.2.2.1 (March 11, 2019) ##
144
+ *Rafael Mendonça França*
105
145
 
106
- * Generate random development secrets
146
+ * Remove deprecated `rake initializers` tasks.
107
147
 
108
- A random development secret is now generated to tmp/development_secret.txt
148
+ *Rafael Mendonça França*
109
149
 
110
- This avoids an issue where development mode servers were vulnerable to
111
- remote code execution.
150
+ * Remove deprecated support for using the `HOST` environment variable to specify the server IP.
112
151
 
113
- Fixes CVE-2019-5420
152
+ *Rafael Mendonça França*
114
153
 
115
- *Eileen M. Uchitelle*, *Aaron Patterson*, *John Hawthorn*
154
+ * Remove deprecated `server` argument from the rails server command.
116
155
 
156
+ *Rafael Mendonça França*
117
157
 
118
- ## Rails 5.2.2 (December 04, 2018) ##
158
+ * Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`.
119
159
 
120
- * Disable content security policy for mailer previews.
160
+ *Rafael Mendonça França*
121
161
 
122
- *Dylan Reile*
162
+ * Remove deprecated `connection` option in the `rails dbconsole` command.
123
163
 
124
- * Log the remote IP address of clients behind a proxy.
164
+ *Rafael Mendonça França*
125
165
 
126
- *Atul Bhosale*
166
+ * Remove depreated `rake notes` tasks.
127
167
 
168
+ *Rafael Mendonça França*
128
169
 
129
- ## Rails 5.2.1.1 (November 27, 2018) ##
170
+ * Return a 405 Method Not Allowed response when a request uses an unknown HTTP method.
130
171
 
131
- * No changes.
172
+ Fixes #38998.
132
173
 
174
+ *Loren Norman*
133
175
 
134
- ## Rails 5.2.1 (August 07, 2018) ##
176
+ * Make railsrc file location xdg-specification compliant
135
177
 
136
- * Respect `NODE_ENV` when running `rails yarn:install`.
178
+ `rails new` will now look for the default `railsrc` file at
179
+ `$XDG_CONFIG_HOME/rails/railsrc` (or `~/.config/rails/railsrc` if
180
+ `XDG_CONFIG_HOME` is not set). If this file does not exist, `rails new`
181
+ will fall back to `~/.railsrc`.
137
182
 
138
- *Max Melentiev*
183
+ The fallback behaviour means this does not cause any breaking changes.
139
184
 
140
- * Don't generate unused files in `app:update` task
185
+ *Nick Wolf*
141
186
 
142
- Skip the assets' initializer when sprockets isn't loaded.
187
+ * Change the default logging level from :debug to :info to avoid inadvertent exposure of personally
188
+ identifiable information (PII) in production environments.
143
189
 
144
- Skip `config/spring.rb` when spring isn't loaded.
190
+ *Eric M. Payne*
145
191
 
146
- *Tsukuru Tanimichi*
192
+ * Automatically generate abstract class when using multiple databases.
147
193
 
148
- * Don't include `bootsnap` by default in apps generated under JRuby.
194
+ When generating a scaffold for a multiple database application, Rails will now automatically generate the abstract class for the database when the database argument is passed. This abstract class will include the connection information for the writing configuration and any models generated for that database will automatically inherit from the abstract class.
149
195
 
150
- Fixes #32641.
196
+ Usage:
151
197
 
152
- *Guillermo Iguaran*
198
+ ```bash
199
+ $ bin/rails generate scaffold Pet name:string --database=animals
200
+ ```
153
201
 
154
- * Create the `.ruby-version` file compatible with MRI/JRuby by default.
202
+ Will create an abstract class for the animals connection.
155
203
 
156
- Fixes #32639.
204
+ ```ruby
205
+ class AnimalsRecord < ApplicationRecord
206
+ self.abstract_class = true
157
207
 
158
- *Guillermo Iguaran*
208
+ connects_to database: { writing: :animals }
209
+ end
210
+ ```
159
211
 
160
- * Make the master.key file read-only for the owner upon generation on
161
- POSIX-compliant systems.
212
+ And generate a `Pet` model that inherits from the new `AnimalsRecord`:
162
213
 
163
- Previously:
214
+ ```ruby
215
+ class Pet < AnimalsRecord
216
+ end
217
+ ```
164
218
 
165
- $ ls -l config/master.key
166
- -rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key
219
+ If you already have an abstract class and it follows a different pattern than Rails defaults, you can pass a parent class with the database argument.
167
220
 
168
- Now:
221
+ ```bash
222
+ $ bin/rails generate scaffold Pet name:string --database=animals --parent=SecondaryBase
223
+ ```
169
224
 
170
- $ ls -l config/master.key
171
- -rw------- 1 owner group 32 Jan 1 00:00 master.key
225
+ This will ensure the model inherits from the `SecondaryBase` parent instead of `AnimalsRecord`
172
226
 
173
- Fixes #32604.
227
+ ```ruby
228
+ class Pet < SecondaryBase
229
+ end
230
+ ```
174
231
 
175
- *Jose Luis Duran*
232
+ *Eileen M. Uchitelle*, *John Crepezzi*
176
233
 
177
- * Allow use of `minitest-rails` gem with Rails test runner.
234
+ * Accept params from url to prepopulate the Inbound Emails form in Rails conductor.
178
235
 
179
- Fixes #31324.
236
+ *Chris Oliver*
180
237
 
181
- *Yuji Yaginuma*
238
+ * Create a new rails app using a minimal stack.
239
+
240
+ `rails new cool_app --minimal`
182
241
 
242
+ All the following are excluded from your minimal stack:
183
243
 
184
- ## Rails 5.2.0 (April 09, 2018) ##
244
+ - action_cable
245
+ - action_mailbox
246
+ - action_mailer
247
+ - action_text
248
+ - active_job
249
+ - active_storage
250
+ - bootsnap
251
+ - jbuilder
252
+ - spring
253
+ - system_tests
254
+ - turbolinks
255
+ - webpack
185
256
 
186
- * Fix minitest rails plugin.
257
+ *Haroon Ahmed*, *DHH*
187
258
 
188
- The custom reporters are added only if needed.
259
+ * Add default ENV variable option with BACKTRACE to turn off backtrace cleaning when debugging framework code in the
260
+ generated config/initializers/backtrace_silencers.rb.
189
261
 
190
- This will fix conflicts with others plugins.
262
+ `BACKTRACE=1 ./bin/rails runner "MyClass.perform"`
191
263
 
192
- *Kevin Robatel*
264
+ *DHH*
193
265
 
194
- * Deprecate `after_bundle` callback in Rails plugin templates.
266
+ * The autoloading guide for Zeitwerk mode documents how to autoload classes
267
+ during application boot in a safe way.
268
+
269
+ *Haroon Ahmed*, *Xavier Noria*
270
+
271
+ * The `classic` autoloader starts its deprecation cycle.
272
+
273
+ New Rails projects are strongly discouraged from using `classic`, and we recommend that existing projects running on `classic` switch to `zeitwerk` mode when upgrading. Please check the [_Upgrading Ruby on Rails_](https://guides.rubyonrails.org/upgrading_ruby_on_rails.html) guide for tips.
274
+
275
+ *Xavier Noria*
276
+
277
+ * Adds `rails test:all` for running all tests in the test directory.
278
+
279
+ This runs all test files in the test directory, including system tests.
280
+
281
+ *Niklas Häusele*
282
+
283
+ * Add `config.generators.after_generate` for processing to generated files.
284
+
285
+ Register a callback that will get called right after generators has finished.
195
286
 
196
287
  *Yuji Yaginuma*
197
288
 
198
- * `rails new` and `rails plugin new` get `Active Storage` by default.
199
- Add ability to skip `Active Storage` with `--skip-active-storage`
200
- and do so automatically when `--skip-active-record` is used.
289
+ * Make test file patterns configurable via Environment variables
201
290
 
202
- *bogdanvlviv*
291
+ This makes test file patterns configurable via two environment variables:
292
+ `DEFAULT_TEST`, to configure files to test, and `DEFAULT_TEST_EXCLUDE`,
293
+ to configure files to exclude from testing.
203
294
 
204
- * Gemfile for new apps: upgrade redis-rb from ~> 3.0 to 4.0.
295
+ These values were hardcoded before, which made it difficult to add
296
+ new categories of tests that should not be executed by default (e.g:
297
+ smoke tests).
205
298
 
206
- *Jeremy Daer*
299
+ *Jorge Manrubia*
207
300
 
208
- * Add `mini_magick` to default `Gemfile` as comment.
301
+ * No longer include `rake rdoc` task when generating plugins.
209
302
 
210
- *Yoshiyuki Hirano*
303
+ To generate docs, use the `rdoc lib` command instead.
211
304
 
212
- * Derive `secret_key_base` from the app name in development and test environments.
305
+ *Jonathan Hefner*
213
306
 
214
- Spares away needless secret configs.
307
+ * Allow relative paths with trailing slashes to be passed to `rails test`.
215
308
 
216
- *DHH*, *Kasper Timm Hansen*
309
+ *Eugene Kenny*
217
310
 
218
- * Support multiple versions arguments for `gem` method of Generators.
311
+ * Add `rack-mini-profiler` gem to the default `Gemfile`.
219
312
 
220
- *Yoshiyuki Hirano*
313
+ `rack-mini-profiler` displays performance information such as SQL time and flame graphs.
314
+ It's enabled by default in development environment, but can be enabled in production as well.
315
+ See the gem [README](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md) for information on how to enable it in production.
221
316
 
222
- * Add `--skip-yarn` option to the plugin generator.
317
+ *Osama Sayegh*
223
318
 
224
- *bogdanvlviv*
319
+ * `rails stats` will now count TypeScript files toward JavaScript stats.
225
320
 
226
- * Optimize routes indentation.
321
+ *Joshua Cody*
227
322
 
228
- *Yoshiyuki Hirano*
323
+ * Run `git init` when generating plugins.
229
324
 
230
- * Optimize indentation for generator actions.
325
+ Opt out with `--skip-git`.
231
326
 
232
- *Yoshiyuki Hirano*
327
+ *OKURA Masafumi*
233
328
 
234
- * Skip unused components when running `bin/rails` in Rails plugin.
329
+ * Add benchmark generator.
235
330
 
236
- *Yoshiyuki Hirano*
331
+ Introduce benchmark generator to benchmark Rails applications.
237
332
 
238
- * Add `git_source` to `Gemfile` for plugin generator.
333
+ `rails generate benchmark opt_compare`
239
334
 
240
- *Yoshiyuki Hirano*
335
+ This creates a benchmark file that uses [`benchmark-ips`](https://github.com/evanphx/benchmark-ips).
336
+ By default, two code blocks can be benchmarked using the `before` and `after` reports.
241
337
 
242
- * Add `--skip-action-cable` option to the plugin generator.
338
+ You can run the generated benchmark file using:
339
+ `ruby script/benchmarks/opt_compare.rb`
243
340
 
244
- *bogdanvlviv*
341
+ *Kevin Jalbert*, *Gannon McGibbon*
245
342
 
246
- * Deprecate support for using a `Rails::Application` subclass to start Rails server.
343
+ * Cache compiled view templates when running tests by default.
247
344
 
248
- *Yuji Yaginuma*
345
+ When generating a new app without `--skip-spring`, caching classes is
346
+ disabled in `environments/test.rb`. This implicitly disables caching
347
+ view templates too. This change will enable view template caching by
348
+ adding this to the generated `environments/test.rb`:
249
349
 
250
- * Add `ruby x.x.x` version to `Gemfile` and create `.ruby-version`
251
- root file containing the current Ruby version when new Rails applications are
252
- created.
350
+ ```ruby
351
+ config.action_view.cache_template_loading = true
352
+ ```
253
353
 
254
- *Alberto Almagro*
354
+ *Jorge Manrubia*
255
355
 
256
- * Support `-` as a platform-agnostic way to run a script from stdin with
257
- `rails runner`
356
+ * Introduce middleware move operations.
258
357
 
259
- *Cody Cutrer*
358
+ With this change, you no longer need to delete and reinsert a middleware to
359
+ move it from one place to another in the stack:
260
360
 
261
- * Add `bootsnap` to default `Gemfile`.
361
+ ```ruby
362
+ config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns
363
+ ```
262
364
 
263
- *Burke Libbey*
365
+ This will move the `Magical::Unicorns` middleware before
366
+ `ActionDispatch::Flash`. You can also move it after with:
264
367
 
265
- * Properly expand shortcuts for environment's name running the `console`
266
- and `dbconsole` commands.
368
+ ```ruby
369
+ config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns
370
+ ```
267
371
 
268
- *Robin Dupret*
372
+ *Genadi Samokovarov*
269
373
 
270
- * Passing the environment's name as a regular argument to the
271
- `rails dbconsole` and `rails console` commands is deprecated.
272
- The `-e` option should be used instead.
374
+ * Generators that inherit from NamedBase respect `--force` option.
273
375
 
274
- Previously:
376
+ *Josh Brody*
275
377
 
276
- $ bin/rails dbconsole production
378
+ * Allow configuration of eager_load behaviour for rake environment:
277
379
 
278
- Now:
380
+ config.rake_eager_load
279
381
 
280
- $ bin/rails dbconsole -e production
382
+ Defaults to `false` as per previous behaviour.
281
383
 
282
- *Robin Dupret*, *Kasper Timm Hansen*
384
+ *Thierry Joyal*
283
385
 
284
- * Allow passing a custom connection name to the `rails dbconsole`
285
- command when using a 3-level database configuration.
386
+ * Ensure Rails migration generator respects system-wide primary key config.
286
387
 
287
- $ bin/rails dbconsole -c replica
388
+ When rails is configured to use a specific primary key type:
288
389
 
289
- *Robin Dupret*, *Jeremy Daer*
390
+ ```ruby
391
+ config.generators do |g|
392
+ g.orm :active_record, primary_key_type: :uuid
393
+ end
394
+ ```
290
395
 
291
- * Skip unused components when running `bin/rails app:update`.
396
+ Previously:
292
397
 
293
- If the initial app generation skipped Action Cable, Active Record etc.,
294
- the update task honors those skips too.
398
+ ```bash
399
+ $ bin/rails g migration add_location_to_users location:references
400
+ ```
295
401
 
296
- *Yuji Yaginuma*
402
+ The references line in the migration would not have `type: :uuid`.
403
+ This change causes the type to be applied appropriately.
297
404
 
298
- * Make Rails' test runner work better with minitest plugins.
405
+ *Louis-Michel Couture*, *Dermot Haughey*
299
406
 
300
- By demoting the Rails test runner to just another minitest plugin —
301
- and thereby not eager loading it — we can co-exist much better with
302
- other minitest plugins such as pride and minitest-focus.
407
+ * Deprecate `Rails::DBConsole#config`.
303
408
 
304
- *Kasper Timm Hansen*
409
+ `Rails::DBConsole#config` is deprecated without replacement. Use `Rails::DBConsole.db_config.configuration_hash` instead.
305
410
 
306
- * Load environment file in `dbconsole` command.
411
+ *Eileen M. Uchitelle*, *John Crepezzi*
307
412
 
308
- Fixes #29717.
413
+ * `Rails.application.config_for` merges shared configuration deeply.
309
414
 
310
- *Yuji Yaginuma*
415
+ ```yaml
416
+ # config/example.yml
417
+ shared:
418
+ foo:
419
+ bar:
420
+ baz: 1
421
+ development:
422
+ foo:
423
+ bar:
424
+ qux: 2
425
+ ```
311
426
 
312
- * Add `rails secrets:show` command.
427
+ ```ruby
428
+ # Previously
429
+ Rails.application.config_for(:example)[:foo][:bar] #=> { qux: 2 }
313
430
 
314
- *Yuji Yaginuma*
431
+ # Now
432
+ Rails.application.config_for(:example)[:foo][:bar] #=> { baz: 1, qux: 2 }
433
+ ```
315
434
 
316
- * Allow mounting the same engine several times in different locations.
435
+ *Yuhei Kiriyama*
317
436
 
318
- Fixes #20204.
437
+ * Remove access to values in nested hashes returned by `Rails.application.config_for` via String keys.
319
438
 
320
- *David Rodríguez*
439
+ ```yaml
440
+ # config/example.yml
441
+ development:
442
+ options:
443
+ key: value
444
+ ```
321
445
 
322
- * Clear screenshot files in `tmp:clear` task.
446
+ ```ruby
447
+ Rails.application.config_for(:example).options
448
+ ```
323
449
 
324
- *Yuji Yaginuma*
450
+ This used to return a Hash on which you could access values with String keys. This was deprecated in 6.0, and now doesn't work anymore.
325
451
 
326
- * Add `railtie.rb` to the plugin generator
452
+ *Étienne Barrié*
327
453
 
328
- *Tsukuru Tanimichi*
454
+ * Configuration files for environments (`config/environments/*.rb`) are
455
+ now able to modify `autoload_paths`, `autoload_once_paths`, and
456
+ `eager_load_paths`.
329
457
 
330
- * Deprecate `capify!` method in generators and templates.
458
+ As a consequence, applications cannot autoload within those files. Before, they technically could, but changes in autoloaded classes or modules had no effect anyway in the configuration because reloading does not reboot.
331
459
 
332
- *Yuji Yaginuma*
460
+ Ways to use application code in these files:
333
461
 
334
- * Allow irb options to be passed from `rails console` command.
462
+ * Define early in the boot process a class that is not reloadable, from which the application takes configuration values that get passed to the framework.
335
463
 
336
- Fixes #28988.
464
+ ```ruby
465
+ # In config/application.rb, for example.
466
+ require "#{Rails.root}/lib/my_app/config"
337
467
 
338
- *Yuji Yaginuma*
468
+ # In config/environments/development.rb, for example.
469
+ config.foo = MyApp::Config.foo
470
+ ```
471
+
472
+ * If the class has to be reloadable, then wrap the configuration code in a `to_prepare` block:
473
+
474
+ ```ruby
475
+ config.to_prepare do
476
+ config.foo = MyModel.foo
477
+ end
478
+ ```
339
479
 
340
- * Added a shared section to `config/database.yml` that will be loaded for all environments.
480
+ That assigns the latest `MyModel.foo` to `config.foo` when the application boots, and each time there is a reload. But whether that has an effect or not depends on the configuration point, since it is not uncommon for engines to read the application configuration during initialization and set their own state from them. That process happens only on boot, not on reloads, and if that is how `config.foo` worked, resetting it would have no effect in the state of the engine.
341
481
 
342
- *Pierre Schambacher*
482
+ *Allen Hsu* & *Xavier Noria*
343
483
 
344
- * Namespace error pages' CSS selectors to stop the styles from bleeding into other pages
345
- when using Turbolinks.
484
+ * Support using environment variable to set pidfile.
346
485
 
347
- *Jan Krutisch*
486
+ *Ben Thorner*
348
487
 
349
488
 
350
- Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/railties/CHANGELOG.md) for previous changes.
489
+ Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/railties/CHANGELOG.md) for previous changes.