railties 5.2.6 → 6.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of railties might be problematic. Click here for more details.

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