railties 5.2.4.rc1 → 6.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +281 -130
  3. data/MIT-LICENSE +1 -1
  4. data/RDOC_MAIN.rdoc +38 -31
  5. data/README.rdoc +2 -2
  6. data/lib/minitest/rails_plugin.rb +7 -11
  7. data/lib/rails.rb +5 -0
  8. data/lib/rails/all.rb +4 -0
  9. data/lib/rails/api/generator.rb +2 -1
  10. data/lib/rails/api/task.rb +16 -0
  11. data/lib/rails/app_loader.rb +2 -2
  12. data/lib/rails/app_updater.rb +3 -1
  13. data/lib/rails/application.rb +71 -29
  14. data/lib/rails/application/bootstrap.rb +2 -10
  15. data/lib/rails/application/configuration.rb +113 -13
  16. data/lib/rails/application/default_middleware_stack.rb +3 -0
  17. data/lib/rails/application/dummy_erb_compiler.rb +18 -0
  18. data/lib/rails/application/finisher.rb +54 -0
  19. data/lib/rails/autoloaders.rb +44 -0
  20. data/lib/rails/backtrace_cleaner.rb +5 -17
  21. data/lib/rails/code_statistics.rb +3 -3
  22. data/lib/rails/command.rb +11 -10
  23. data/lib/rails/command/base.rb +12 -8
  24. data/lib/rails/command/behavior.rb +7 -48
  25. data/lib/rails/command/environment_argument.rb +8 -15
  26. data/lib/rails/command/spellchecker.rb +58 -0
  27. data/lib/rails/commands/console/console_command.rb +6 -0
  28. data/lib/rails/commands/credentials/USAGE +19 -1
  29. data/lib/rails/commands/credentials/credentials_command.rb +52 -19
  30. data/lib/rails/commands/db/system/change/change_command.rb +20 -0
  31. data/lib/rails/commands/dbconsole/dbconsole_command.rb +20 -8
  32. data/lib/rails/commands/dev/dev_command.rb +19 -0
  33. data/lib/rails/commands/encrypted/USAGE +1 -1
  34. data/lib/rails/commands/encrypted/encrypted_command.rb +2 -2
  35. data/lib/rails/commands/help/help_command.rb +1 -1
  36. data/lib/rails/commands/initializers/initializers_command.rb +23 -0
  37. data/lib/rails/commands/new/new_command.rb +2 -2
  38. data/lib/rails/commands/notes/notes_command.rb +39 -0
  39. data/lib/rails/commands/plugin/plugin_command.rb +1 -1
  40. data/lib/rails/commands/routes/routes_command.rb +37 -0
  41. data/lib/rails/commands/runner/runner_command.rb +13 -9
  42. data/lib/rails/commands/secrets/USAGE +3 -3
  43. data/lib/rails/commands/secrets/secrets_command.rb +3 -3
  44. data/lib/rails/commands/server/server_command.rb +113 -50
  45. data/lib/rails/configuration.rb +1 -7
  46. data/lib/rails/engine.rb +24 -16
  47. data/lib/rails/engine/configuration.rb +3 -1
  48. data/lib/rails/gem_version.rb +4 -4
  49. data/lib/rails/generators.rb +11 -10
  50. data/lib/rails/generators/actions.rb +52 -39
  51. data/lib/rails/generators/app_base.rb +52 -92
  52. data/lib/rails/generators/app_name.rb +50 -0
  53. data/lib/rails/generators/base.rb +0 -4
  54. data/lib/rails/generators/database.rb +58 -0
  55. data/lib/rails/generators/erb/mailer/mailer_generator.rb +1 -1
  56. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +6 -3
  57. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +1 -1
  58. data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +9 -1
  59. data/lib/rails/generators/generated_attribute.rb +53 -27
  60. data/lib/rails/generators/migration.rb +1 -2
  61. data/lib/rails/generators/model_helpers.rb +8 -1
  62. data/lib/rails/generators/named_base.rb +1 -5
  63. data/lib/rails/generators/rails/app/app_generator.rb +37 -72
  64. data/lib/rails/generators/rails/app/templates/Gemfile.tt +6 -9
  65. data/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +0 -3
  66. data/lib/rails/generators/rails/app/templates/app/{assets/javascripts/cable.js.tt → javascript/channels/consumer.js} +2 -9
  67. data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +5 -0
  68. data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +23 -0
  69. data/lib/rails/generators/rails/app/templates/app/jobs/application_job.rb.tt +5 -0
  70. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +4 -4
  71. data/lib/rails/generators/rails/app/templates/bin/setup.tt +7 -7
  72. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +2 -0
  73. data/lib/rails/generators/rails/app/templates/config/cable.yml.tt +1 -1
  74. data/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt +2 -2
  75. data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt +2 -2
  76. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +2 -2
  77. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +3 -3
  78. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +3 -3
  79. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +1 -1
  80. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +4 -4
  81. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +2 -2
  82. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +6 -6
  83. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
  84. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +2 -2
  85. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +5 -2
  86. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +28 -12
  87. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +13 -7
  88. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +1 -1
  89. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +7 -0
  90. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +40 -0
  91. data/lib/rails/generators/rails/app/templates/config/locales/en.yml +1 -1
  92. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +4 -6
  93. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +1 -1
  94. data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +6 -6
  95. data/lib/rails/generators/rails/app/templates/gitignore.tt +2 -7
  96. data/lib/rails/generators/rails/app/templates/package.json.tt +7 -1
  97. data/lib/rails/generators/rails/app/templates/public/robots.txt +1 -1
  98. data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
  99. data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +11 -0
  100. data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +7 -0
  101. data/lib/rails/generators/rails/assets/USAGE +1 -4
  102. data/lib/rails/generators/rails/assets/assets_generator.rb +0 -1
  103. data/lib/rails/generators/rails/controller/controller_generator.rb +11 -1
  104. data/lib/rails/generators/rails/credentials/credentials_generator.rb +7 -8
  105. data/lib/rails/generators/rails/db/system/change/change_generator.rb +65 -0
  106. data/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb +4 -5
  107. data/lib/rails/generators/rails/helper/helper_generator.rb +5 -0
  108. data/lib/rails/generators/rails/plugin/plugin_generator.rb +9 -33
  109. data/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +1 -1
  110. data/lib/rails/generators/rails/plugin/templates/app/helpers/%namespaced_name%/application_helper.rb.tt +1 -1
  111. data/lib/rails/generators/rails/plugin/templates/app/jobs/%namespaced_name%/application_job.rb.tt +1 -1
  112. data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +1 -1
  113. data/lib/rails/generators/rails/plugin/templates/app/models/%namespaced_name%/application_record.rb.tt +1 -1
  114. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +1 -1
  115. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +1 -1
  116. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/railtie.rb.tt +1 -1
  117. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +1 -2
  118. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +14 -0
  119. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -1
  120. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +1 -1
  121. data/lib/rails/generators/resource_helpers.rb +1 -6
  122. data/lib/rails/generators/test_unit/integration/integration_generator.rb +6 -0
  123. data/lib/rails/generators/test_unit/job/job_generator.rb +5 -0
  124. data/lib/rails/generators/test_unit/mailer/mailer_generator.rb +1 -1
  125. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +2 -2
  126. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +8 -3
  127. data/lib/rails/generators/test_unit/system/system_generator.rb +5 -0
  128. data/lib/rails/generators/testing/behaviour.rb +3 -0
  129. data/lib/rails/info.rb +2 -2
  130. data/lib/rails/info_controller.rb +1 -1
  131. data/lib/rails/mailers_controller.rb +7 -4
  132. data/lib/rails/paths.rb +19 -9
  133. data/lib/rails/railtie.rb +1 -1
  134. data/lib/rails/ruby_version_check.rb +3 -3
  135. data/lib/rails/secrets.rb +0 -1
  136. data/lib/rails/source_annotation_extractor.rb +138 -117
  137. data/lib/rails/tasks.rb +1 -0
  138. data/lib/rails/tasks/annotations.rake +9 -9
  139. data/lib/rails/tasks/dev.rake +5 -4
  140. data/lib/rails/tasks/framework.rake +5 -1
  141. data/lib/rails/tasks/initializers.rake +5 -4
  142. data/lib/rails/tasks/log.rake +0 -1
  143. data/lib/rails/tasks/routes.rake +4 -26
  144. data/lib/rails/tasks/statistics.rake +4 -0
  145. data/lib/rails/tasks/yarn.rake +1 -1
  146. data/lib/rails/tasks/zeitwerk.rake +66 -0
  147. data/lib/rails/templates/rails/welcome/index.html.erb +2 -2
  148. data/lib/rails/test_help.rb +11 -9
  149. data/lib/rails/test_unit/reporter.rb +1 -1
  150. data/lib/rails/test_unit/runner.rb +5 -5
  151. data/lib/rails/test_unit/testing.rake +1 -1
  152. metadata +32 -23
  153. data/lib/rails/generators/js/assets/assets_generator.rb +0 -15
  154. data/lib/rails/generators/js/assets/templates/javascript.js +0 -2
  155. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +0 -22
  156. data/lib/rails/generators/rails/app/templates/bin/bundle.tt +0 -2
  157. data/lib/rails/generators/rails/app/templates/bin/update.tt +0 -34
  158. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_5_2.rb.tt +0 -38
  159. data/lib/rails/generators/rails/assets/templates/javascript.js +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 596bc96d4a84b3fe00bf3a420eeddac6c9fa669d66f7f61143c80d85c46f12c4
4
- data.tar.gz: 3d5d05d4bd393fcb62ed2ec4e723def22ac22ff78d8883eb738c0ca31b86c4eb
3
+ metadata.gz: 675e7410955b3db15a67651cf4e38f4d57855bd10bd08464a3d5948060c564c2
4
+ data.tar.gz: 595646ed9429a025598744f2dd9dabf7d273662e044e8de5aabe7529afc7a4ad
5
5
  SHA512:
6
- metadata.gz: 994c70d561ee85193606fe7050db9d56ff204c051cec9dd0da64c29c2e7c4e921a26809b7f4bf8e91e86fbf8eb6e00a953f05ef43181ece607691a6d7d1dd6c8
7
- data.tar.gz: 5a8b698fcc30d66117962171a300d38dfc04fa06cf39e7228189ef963ae7d5a40abef2ba8d9735484eba26cf615f803f65f812908aa76ae2c75e6c095e085a05
6
+ metadata.gz: 0a789a9816b7c53b1a5891b1bec4b23a009c66a0a1e11866e2b73afb5ad4e19d776654211bae88d1d495f793592d6bdf4c3f00a69767df874b71c4653719ca69
7
+ data.tar.gz: fdaf816aeba243f1e45c34db27ab3a0742636dc07ff4f21a4c8cf3ea414516f910854da9269c7e636195f56745c93b11dedbf5d117570eb85176d5c6e0a1d8d8
@@ -1,8 +1,36 @@
1
- ## Rails 5.2.4.rc1 (November 22, 2019) ##
1
+ ## Rails 6.0.0.rc2 (July 22, 2019) ##
2
2
 
3
- * Use original `bundler` environment variables during the process of generating a new rails project.
3
+ * No changes.
4
4
 
5
- *Marco Costa*
5
+
6
+ ## (Unreleased)
7
+
8
+ * The new configuration point `config.add_autoload_paths_to_load_path` allows
9
+ users to opt-out from adding autoload paths to `$LOAD_PATH`. This flag is
10
+ `true` by default, but it is recommended to be set to `false` in `:zeitwerk`
11
+ mode early, in `config/application.rb`.
12
+
13
+ Zeitwerk uses only absolute paths internally, and applications running in
14
+ `:zeitwerk` mode do not need `require_dependency`, so models, controllers,
15
+ jobs, etc. do not need to be in `$LOAD_PATH`. Setting this to `false` saves
16
+ Ruby from checking these directories when resolving `require` calls with
17
+ relative paths, and saves Bootsnap work and RAM, since it does not need to
18
+ build an index for them.
19
+
20
+ *Xavier Noria*
21
+
22
+ ## Rails 6.0.0.rc1 (April 24, 2019) ##
23
+
24
+ * Applications upgrading to Rails 6 can run the command
25
+
26
+ ```
27
+ bin/rails zeitwerk:check
28
+ ```
29
+
30
+ to check if the project structure they were using with the classic
31
+ autoloader is compatible with `:zeitwerk` mode.
32
+
33
+ *Matilda Smeds* & *Xavier Noria*
6
34
 
7
35
  * Allow loading seeds without ActiveJob.
8
36
 
@@ -10,23 +38,56 @@
10
38
 
11
39
  *Jeremy Weathers*
12
40
 
41
+ * `null: false` is set in the migrations by default for column pointed by
42
+ `belongs_to` / `references` association generated by model generator.
43
+
44
+ Also deprecate passing {required} to the model generator.
45
+
46
+ *Prathamesh Sonpatki*
47
+
48
+ * New applications get `config.cache_classes = false` in `config/environments/test.rb`
49
+ unless `--skip-spring`.
50
+
51
+ *Xavier Noria*
52
+
53
+ * Autoloading during initialization is deprecated.
54
+
55
+ *Xavier Noria*
56
+
13
57
  * Only force `:async` ActiveJob adapter to `:inline` during seeding.
14
58
 
15
59
  *BatedUrGonnaDie*
16
60
 
61
+ * The `connection` option of `rails dbconsole` command is deprecated in
62
+ favor of `database` option.
17
63
 
18
- ## Rails 5.2.3 (March 27, 2019) ##
64
+ *Yuji Yaginuma*
19
65
 
20
- * Seed database with inline ActiveJob job adapter.
66
+ * Replace `chromedriver-helper` gem with `webdrivers` in default Gemfile.
67
+ `chromedriver-helper` is deprecated as of March 31, 2019 and won't
68
+ receive any further updates.
21
69
 
22
- *Gannon McGibbon*
70
+ *Guillermo Iguaran‮*
23
71
 
24
- * Fix boolean interaction in scaffold system tests.
72
+ * Applications running in `:zeitwerk` mode that use `bootsnap` need
73
+ to upgrade `bootsnap` to at least 1.4.2.
25
74
 
26
- *Gannon McGibbon*
75
+ *Xavier Noria*
76
+
77
+ * Add `config.disable_sandbox` option to Rails console.
27
78
 
79
+ This setting will disable `rails console --sandbox` mode, preventing
80
+ developer from accidentally starting a sandbox console,
81
+ which when left inactive, can cause the database server to run out of memory.
28
82
 
29
- ## Rails 5.2.2.1 (March 11, 2019) ##
83
+ *Prem Sichanugrist*
84
+
85
+ * Add `-e/--environment` option to `rails initializers`.
86
+
87
+ *Yuji Yaginuma*
88
+
89
+
90
+ ## Rails 6.0.0.beta3 (March 11, 2019) ##
30
91
 
31
92
  * Generate random development secrets
32
93
 
@@ -40,236 +101,326 @@
40
101
  *Eileen M. Uchitelle*, *Aaron Patterson*, *John Hawthorn*
41
102
 
42
103
 
43
- ## Rails 5.2.2 (December 04, 2018) ##
104
+ ## Rails 6.0.0.beta2 (February 25, 2019) ##
44
105
 
45
- * Disable content security policy for mailer previews.
106
+ * Fix non-symbol access to nested hashes returned from `Rails::Application.config_for`
107
+ being broken by allowing non-symbol access with a deprecation notice.
46
108
 
47
- *Dylan Reile*
109
+ *Ufuk Kayserilioglu*
48
110
 
49
- * Log the remote IP address of clients behind a proxy.
111
+ * Fix deeply nested namespace command printing.
50
112
 
51
- *Atul Bhosale*
113
+ *Gannon McGibbon*
52
114
 
53
115
 
54
- ## Rails 5.2.1.1 (November 27, 2018) ##
116
+ ## Rails 6.0.0.beta1 (January 18, 2019) ##
55
117
 
56
- * No changes.
118
+ * Remove deprecated `after_bundle` helper inside plugins templates.
57
119
 
120
+ *Rafael Mendonça França*
58
121
 
59
- ## Rails 5.2.1 (August 07, 2018) ##
122
+ * Remove deprecated support to old `config.ru` that use the application class as argument of `run`.
60
123
 
61
- * Respect `NODE_ENV` when running `rails yarn:install`.
124
+ *Rafael Mendonça França*
62
125
 
63
- *Max Melentiev*
126
+ * Remove deprecated `environment` argument from the rails commands.
64
127
 
65
- * Don't generate unused files in `app:update` task
128
+ *Rafael Mendonça França*
66
129
 
67
- Skip the assets' initializer when sprockets isn't loaded.
130
+ * Remove deprecated `capify!`.
68
131
 
69
- Skip `config/spring.rb` when spring isn't loaded.
132
+ *Rafael Mendonça França*
70
133
 
71
- *Tsukuru Tanimichi*
72
-
73
- * Don't include `bootsnap` by default in apps generated under JRuby.
134
+ * Remove deprecated `config.secret_token`.
74
135
 
75
- Fixes #32641.
136
+ *Rafael Mendonça França*
76
137
 
77
- *Guillermo Iguaran*
138
+ * Seed database with inline ActiveJob job adapter.
78
139
 
79
- * Create the `.ruby-version` file compatible with MRI/JRuby by default.
140
+ *Gannon McGibbon*
80
141
 
81
- Fixes #32639.
142
+ * Add `rails db:system:change` command for changing databases.
82
143
 
83
- *Guillermo Iguaran*
144
+ ```
145
+ bin/rails db:system:change --to=postgresql
146
+ force config/database.yml
147
+ gsub Gemfile
148
+ ```
84
149
 
85
- * Make the master.key file read-only for the owner upon generation on
86
- POSIX-compliant systems.
150
+ The change command copies a template `config/database.yml` with
151
+ the target database adapter into your app, and replaces your database gem
152
+ with the target database gem.
87
153
 
88
- Previously:
154
+ *Gannon McGibbon*
89
155
 
90
- $ ls -l config/master.key
91
- -rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key
156
+ * Add `rails test:channels`.
92
157
 
93
- Now:
158
+ *bogdanvlviv*
94
159
 
95
- $ ls -l config/master.key
96
- -rw------- 1 owner group 32 Jan 1 00:00 master.key
160
+ * Use original `bundler` environment variables during the process of generating a new rails project.
97
161
 
98
- Fixes #32604.
162
+ *Marco Costa*
99
163
 
100
- *Jose Luis Duran*
164
+ * Send Active Storage analysis and purge jobs to dedicated queues by default.
101
165
 
102
- * Allow use of `minitest-rails` gem with Rails test runner.
166
+ Analysis jobs now use the `:active_storage_analysis` queue, and purge jobs
167
+ now use the `:active_storage_purge` queue. This matches Action Mailbox,
168
+ which sends its jobs to dedicated queues by default.
103
169
 
104
- Fixes #31324.
170
+ *George Claghorn*
105
171
 
106
- *Yuji Yaginuma*
172
+ * Add `rails test:mailboxes`.
107
173
 
174
+ *George Claghorn*
108
175
 
109
- ## Rails 5.2.0 (April 09, 2018) ##
176
+ * Introduce guard against DNS rebinding attacks.
110
177
 
111
- * Fix minitest rails plugin.
178
+ The `ActionDispatch::HostAuthorization` is a new middleware that prevents
179
+ against DNS rebinding and other `Host` header attacks. It is included in
180
+ the development environment by default with the following configuration:
112
181
 
113
- The custom reporters are added only if needed.
182
+ Rails.application.config.hosts = [
183
+ IPAddr.new("0.0.0.0/0"), # All IPv4 addresses.
184
+ IPAddr.new("::/0"), # All IPv6 addresses.
185
+ "localhost" # The localhost reserved domain.
186
+ ]
114
187
 
115
- This will fix conflicts with others plugins.
188
+ In other environments `Rails.application.config.hosts` is empty and no
189
+ `Host` header checks will be done. If you want to guard against header
190
+ attacks on production, you have to manually permit the allowed hosts
191
+ with:
116
192
 
117
- *Kevin Robatel*
193
+ Rails.application.config.hosts << "product.com"
118
194
 
119
- * Deprecate `after_bundle` callback in Rails plugin templates.
195
+ The host of a request is checked against the `hosts` entries with the case
196
+ operator (`#===`), which lets `hosts` support entries of type `Regexp`,
197
+ `Proc` and `IPAddr` to name a few. Here is an example with a regexp.
120
198
 
121
- *Yuji Yaginuma*
199
+ # Allow requests from subdomains like `www.product.com` and
200
+ # `beta1.product.com`.
201
+ Rails.application.config.hosts << /.*\.product\.com/
122
202
 
123
- * `rails new` and `rails plugin new` get `Active Storage` by default.
124
- Add ability to skip `Active Storage` with `--skip-active-storage`
125
- and do so automatically when `--skip-active-record` is used.
203
+ A special case is supported that allows you to permit all sub-domains:
126
204
 
127
- *bogdanvlviv*
205
+ # Allow requests from subdomains like `www.product.com` and
206
+ # `beta1.product.com`.
207
+ Rails.application.config.hosts << ".product.com"
128
208
 
129
- * Gemfile for new apps: upgrade redis-rb from ~> 3.0 to 4.0.
209
+ *Genadi Samokovarov*
130
210
 
131
- *Jeremy Daer*
211
+ * Remove redundant suffixes on generated helpers.
132
212
 
133
- * Add `mini_magick` to default `Gemfile` as comment.
213
+ *Gannon McGibbon*
134
214
 
135
- *Yoshiyuki Hirano*
215
+ * Remove redundant suffixes on generated integration tests.
136
216
 
137
- * Derive `secret_key_base` from the app name in development and test environments.
217
+ *Gannon McGibbon*
138
218
 
139
- Spares away needless secret configs.
219
+ * Fix boolean interaction in scaffold system tests.
140
220
 
141
- *DHH*, *Kasper Timm Hansen*
221
+ *Gannon McGibbon*
142
222
 
143
- * Support multiple versions arguments for `gem` method of Generators.
223
+ * Remove redundant suffixes on generated system tests.
144
224
 
145
- *Yoshiyuki Hirano*
225
+ *Gannon McGibbon*
146
226
 
147
- * Add `--skip-yarn` option to the plugin generator.
227
+ * Add an `abort_on_failure` boolean option to the generator method that shell
228
+ out (`generate`, `rake`, `rails_command`) to abort the generator if the
229
+ command fails.
148
230
 
149
- *bogdanvlviv*
231
+ *David Rodríguez*
150
232
 
151
- * Optimize routes indentation.
233
+ * Remove `app/assets` and `app/javascript` from `eager_load_paths` and `autoload_paths`.
152
234
 
153
- *Yoshiyuki Hirano*
235
+ *Gannon McGibbon*
154
236
 
155
- * Optimize indentation for generator actions.
237
+ * Use Ids instead of memory addresses when displaying references in scaffold views.
156
238
 
157
- *Yoshiyuki Hirano*
239
+ Fixes #29200.
158
240
 
159
- * Skip unused components when running `bin/rails` in Rails plugin.
241
+ *Rasesh Patel*
160
242
 
161
- *Yoshiyuki Hirano*
243
+ * Adds support for multiple databases to `rails db:migrate:status`.
244
+ Subtasks are also added to get the status of individual databases (eg. `rails db:migrate:status:animals`).
162
245
 
163
- * Add `git_source` to `Gemfile` for plugin generator.
246
+ *Gannon McGibbon*
164
247
 
165
- *Yoshiyuki Hirano*
248
+ * Use Webpacker by default to manage app-level JavaScript through the new app/javascript directory.
249
+ Sprockets is now solely in charge, by default, of compiling CSS and other static assets.
250
+ Action Cable channel generators will create ES6 stubs rather than use CoffeeScript.
251
+ Active Storage, Action Cable, Turbolinks, and Rails-UJS are loaded by a new application.js pack.
252
+ Generators no longer generate JavaScript stubs.
166
253
 
167
- * Add `--skip-action-cable` option to the plugin generator.
254
+ *DHH*, *Lachlan Sylvester*
168
255
 
169
- *bogdanvlviv*
256
+ * Add `database` (aliased as `db`) option to model generator to allow
257
+ setting the database. This is useful for applications that use
258
+ multiple databases and put migrations per database in their own directories.
170
259
 
171
- * Deprecate support for using a `Rails::Application` subclass to start Rails server.
260
+ ```
261
+ bin/rails g model Room capacity:integer --database=kingston
262
+ invoke active_record
263
+ create db/kingston_migrate/20180830151055_create_rooms.rb
264
+ ```
172
265
 
173
- *Yuji Yaginuma*
266
+ Because rails scaffolding uses the model generator, you can
267
+ also specify a database with the scaffold generator.
174
268
 
175
- * Add `ruby x.x.x` version to `Gemfile` and create `.ruby-version`
176
- root file containing the current Ruby version when new Rails applications are
177
- created.
269
+ *Gannon McGibbon*
178
270
 
179
- *Alberto Almagro*
271
+ * Raise an error when "recyclable cache keys" are being used by a cache store
272
+ that does not explicitly support it. Custom cache keys that do support this feature
273
+ can bypass this error by implementing the `supports_cache_versioning?` method on their
274
+ class and returning a truthy value.
180
275
 
181
- * Support `-` as a platform-agnostic way to run a script from stdin with
182
- `rails runner`
276
+ *Richard Schneeman*
183
277
 
184
- *Cody Cutrer*
278
+ * Support environment specific credentials overrides.
185
279
 
186
- * Add `bootsnap` to default `Gemfile`.
280
+ So any environment will look for `config/credentials/#{Rails.env}.yml.enc` and fall back
281
+ to `config/credentials.yml.enc`.
187
282
 
188
- *Burke Libbey*
283
+ The encryption key can be in `ENV["RAILS_MASTER_KEY"]` or `config/credentials/production.key`.
189
284
 
190
- * Properly expand shortcuts for environment's name running the `console`
191
- and `dbconsole` commands.
285
+ Environment credentials overrides can be edited with `rails credentials:edit --environment production`.
286
+ If no override is set up for the passed environment, it will be created.
192
287
 
193
- *Robin Dupret*
288
+ Additionally, the default lookup paths can be overwritten with these configs:
194
289
 
195
- * Passing the environment's name as a regular argument to the
196
- `rails dbconsole` and `rails console` commands is deprecated.
197
- The `-e` option should be used instead.
290
+ - `config.credentials.content_path`
291
+ - `config.credentials.key_path`
198
292
 
199
- Previously:
293
+ *Wojciech Wnętrzak*
200
294
 
201
- $ bin/rails dbconsole production
295
+ * Make `ActiveSupport::Cache::NullStore` the default cache store in the test environment.
202
296
 
203
- Now:
297
+ *Michael C. Nelson*
204
298
 
205
- $ bin/rails dbconsole -e production
299
+ * Emit warning for unknown inflection rule when generating model.
206
300
 
207
- *Robin Dupret*, *Kasper Timm Hansen*
301
+ *Yoshiyuki Kinjo*
208
302
 
209
- * Allow passing a custom connection name to the `rails dbconsole`
210
- command when using a 3-level database configuration.
303
+ * Add `database` (aliased as `db`) option to migration generator.
211
304
 
212
- $ bin/rails dbconsole -c replica
305
+ If you're using multiple databases and have a folder for each database
306
+ for migrations (ex db/migrate and db/new_db_migrate) you can now pass the
307
+ `--database` option to the generator to make sure the the migration
308
+ is inserted into the correct folder.
213
309
 
214
- *Robin Dupret*, *Jeremy Daer*
310
+ ```
311
+ rails g migration CreateHouses --database=kingston
312
+ invoke active_record
313
+ create db/kingston_migrate/20180830151055_create_houses.rb
314
+ ```
215
315
 
216
- * Skip unused components when running `bin/rails app:update`.
316
+ *Eileen M. Uchitelle*
217
317
 
218
- If the initial app generation skipped Action Cable, Active Record etc.,
219
- the update task honors those skips too.
318
+ * Deprecate `rake routes` in favor of `rails routes`.
220
319
 
221
320
  *Yuji Yaginuma*
222
321
 
223
- * Make Rails' test runner work better with minitest plugins.
322
+ * Deprecate `rake initializers` in favor of `rails initializers`.
224
323
 
225
- By demoting the Rails test runner to just another minitest plugin —
226
- and thereby not eager loading it — we can co-exist much better with
227
- other minitest plugins such as pride and minitest-focus.
324
+ *Annie-Claude Côté*
228
325
 
229
- *Kasper Timm Hansen*
326
+ * Deprecate `rake dev:cache` in favor of `rails dev:cache`.
230
327
 
231
- * Load environment file in `dbconsole` command.
328
+ *Annie-Claude Côté*
232
329
 
233
- Fixes #29717.
330
+ * Deprecate `rails notes` subcommands in favor of passing an `annotations` argument to `rails notes`.
234
331
 
235
- *Yuji Yaginuma*
332
+ The following subcommands are replaced by passing `--annotations` or `-a` to `rails notes`:
333
+ - `rails notes:custom ANNOTATION=custom` is deprecated in favor of using `rails notes -a custom`.
334
+ - `rails notes:optimize` is deprecated in favor of using `rails notes -a OPTIMIZE`.
335
+ - `rails notes:todo` is deprecated in favor of using`rails notes -a TODO`.
336
+ - `rails notes:fixme` is deprecated in favor of using `rails notes -a FIXME`.
236
337
 
237
- * Add `rails secrets:show` command.
338
+ *Annie-Claude Côté*
238
339
 
239
- *Yuji Yaginuma*
340
+ * Deprecate `SOURCE_ANNOTATION_DIRECTORIES` environment variable used by `rails notes`
341
+ through `Rails::SourceAnnotationExtractor::Annotation` in favor of using `config.annotations.register_directories`.
240
342
 
241
- * Allow mounting the same engine several times in different locations.
343
+ *Annie-Claude Côté*
242
344
 
243
- Fixes #20204.
345
+ * Deprecate `rake notes` in favor of `rails notes`.
244
346
 
245
- *David Rodríguez*
347
+ *Annie-Claude Côté*
246
348
 
247
- * Clear screenshot files in `tmp:clear` task.
349
+ * Don't generate unused files in `app:update` task.
248
350
 
249
- *Yuji Yaginuma*
351
+ Skip the assets' initializer when sprockets isn't loaded.
352
+
353
+ Skip `config/spring.rb` when spring isn't loaded.
250
354
 
251
- * Add `railtie.rb` to the plugin generator
355
+ Skip yarn's contents when yarn integration isn't used.
252
356
 
253
357
  *Tsukuru Tanimichi*
254
358
 
255
- * Deprecate `capify!` method in generators and templates.
359
+ * Make the master.key file read-only for the owner upon generation on
360
+ POSIX-compliant systems.
256
361
 
257
- *Yuji Yaginuma*
362
+ Previously:
363
+
364
+ $ ls -l config/master.key
365
+ -rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key
366
+
367
+ Now:
368
+
369
+ $ ls -l config/master.key
370
+ -rw------- 1 owner group 32 Jan 1 00:00 master.key
371
+
372
+ Fixes #32604.
373
+
374
+ *Jose Luis Duran*
258
375
 
259
- * Allow irb options to be passed from `rails console` command.
376
+ * Deprecate support for using the `HOST` environment variable to specify the server IP.
260
377
 
261
- Fixes #28988.
378
+ The `BINDING` environment variable should be used instead.
379
+
380
+ Fixes #29516.
262
381
 
263
382
  *Yuji Yaginuma*
264
383
 
265
- * Added a shared section to `config/database.yml` that will be loaded for all environments.
384
+ * Deprecate passing Rack server name as a regular argument to `rails server`.
385
+
386
+ Previously:
387
+
388
+ $ bin/rails server thin
389
+
390
+ There wasn't an explicit option for the Rack server to use, now we have the
391
+ `--using` option with the `-u` short switch.
392
+
393
+ Now:
394
+
395
+ $ bin/rails server -u thin
396
+
397
+ This change also improves the error message if a missing or mistyped rack
398
+ server is given.
399
+
400
+ *Genadi Samokovarov*
401
+
402
+ * Add "rails routes --expanded" option to output routes in expanded mode like
403
+ "psql --expanded". Result looks like:
404
+
405
+ ```
406
+ $ rails routes --expanded
407
+ --[ Route 1 ]------------------------------------------------------------
408
+ Prefix | high_scores
409
+ Verb | GET
410
+ URI | /high_scores(.:format)
411
+ Controller#Action | high_scores#index
412
+ --[ Route 2 ]------------------------------------------------------------
413
+ Prefix | new_high_score
414
+ Verb | GET
415
+ URI | /high_scores/new(.:format)
416
+ Controller#Action | high_scores#new
417
+ ```
266
418
 
267
- *Pierre Schambacher*
419
+ *Benoit Tigeot*
268
420
 
269
- * Namespace error pages' CSS selectors to stop the styles from bleeding into other pages
270
- when using Turbolinks.
421
+ * Rails 6 requires Ruby 2.5.0 or newer.
271
422
 
272
- *Jan Krutisch*
423
+ *Jeremy Daer*, *Kasper Timm Hansen*
273
424
 
274
425
 
275
- Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/railties/CHANGELOG.md) for previous changes.
426
+ Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/railties/CHANGELOG.md) for previous changes.