railties 7.2.2.1 → 8.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +171 -242
- data/README.rdoc +1 -1
- data/lib/minitest/rails_plugin.rb +9 -2
- data/lib/rails/application/bootstrap.rb +1 -4
- data/lib/rails/application/configuration.rb +22 -21
- data/lib/rails/application/default_middleware_stack.rb +4 -0
- data/lib/rails/application/finisher.rb +2 -3
- data/lib/rails/application/routes_reloader.rb +17 -3
- data/lib/rails/application.rb +22 -10
- data/lib/rails/application_controller.rb +2 -0
- data/lib/rails/backtrace_cleaner.rb +3 -3
- data/lib/rails/code_statistics.rb +128 -86
- data/lib/rails/code_statistics_calculator.rb +78 -76
- data/lib/rails/command/helpers/editor.rb +1 -1
- data/lib/rails/command.rb +0 -6
- data/lib/rails/commands/app/update_command.rb +5 -9
- data/lib/rails/commands/console/irb_console.rb +3 -19
- data/lib/rails/commands/credentials/USAGE +4 -4
- data/lib/rails/commands/credentials/credentials_command.rb +5 -1
- data/lib/rails/commands/dev/dev_command.rb +1 -1
- data/lib/rails/commands/devcontainer/devcontainer_command.rb +2 -1
- data/lib/rails/commands/stats/stats_command.rb +19 -0
- data/lib/rails/commands/test/test_command.rb +0 -2
- data/lib/rails/console/methods.rb +5 -21
- data/lib/rails/dev_caching.rb +2 -2
- data/lib/rails/engine/configuration.rb +3 -1
- data/lib/rails/engine/lazy_route_set.rb +111 -0
- data/lib/rails/engine.rb +10 -6
- data/lib/rails/gem_version.rb +4 -4
- data/lib/rails/generators/actions.rb +12 -8
- data/lib/rails/generators/app_base.rb +80 -56
- data/lib/rails/generators/base.rb +0 -4
- data/lib/rails/generators/bundle_helper.rb +34 -0
- data/lib/rails/generators/database.rb +101 -67
- data/lib/rails/generators/erb/authentication/authentication_generator.rb +15 -0
- data/lib/rails/generators/erb/authentication/templates/app/views/passwords/edit.html.erb +9 -0
- data/lib/rails/generators/erb/authentication/templates/app/views/passwords/new.html.erb +8 -0
- data/lib/rails/generators/erb/authentication/templates/app/views/sessions/new.html.erb +11 -0
- data/lib/rails/generators/generated_attribute.rb +16 -11
- data/lib/rails/generators/rails/app/app_generator.rb +30 -30
- data/lib/rails/generators/rails/app/templates/Dockerfile.tt +23 -6
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +27 -12
- data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +6 -11
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +10 -3
- data/lib/rails/generators/rails/app/templates/bin/dev.tt +1 -0
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +5 -8
- data/lib/rails/generators/rails/app/templates/bin/thrust.tt +4 -0
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +24 -1
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +23 -0
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +50 -0
- data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +30 -5
- data/lib/rails/generators/rails/app/templates/config/deploy.yml.tt +128 -0
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +12 -23
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +31 -51
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +5 -19
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +0 -7
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_8_0.rb.tt +30 -0
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +11 -2
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +3 -3
- data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +4 -3
- data/lib/rails/generators/rails/app/templates/dockerignore.tt +7 -2
- data/lib/rails/generators/rails/app/templates/github/ci.yml.tt +15 -7
- data/lib/rails/generators/rails/app/templates/gitignore.tt +1 -2
- data/lib/rails/generators/rails/app/templates/kamal-secrets.tt +17 -0
- data/lib/rails/generators/rails/app/templates/public/400.html +114 -0
- data/lib/rails/generators/rails/app/templates/public/404.html +113 -66
- data/lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html +113 -65
- data/lib/rails/generators/rails/app/templates/public/422.html +113 -66
- data/lib/rails/generators/rails/app/templates/public/500.html +113 -65
- data/lib/rails/generators/rails/app/templates/public/icon.png +0 -0
- data/lib/rails/generators/rails/app/templates/public/icon.svg +2 -2
- data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
- data/lib/rails/generators/rails/authentication/USAGE +6 -0
- data/lib/rails/generators/rails/authentication/authentication_generator.rb +60 -0
- data/lib/rails/generators/rails/authentication/templates/app/channels/application_cable/connection.rb.tt +16 -0
- data/lib/rails/generators/rails/authentication/templates/app/controllers/concerns/authentication.rb.tt +52 -0
- data/lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt +33 -0
- data/lib/rails/generators/rails/authentication/templates/app/controllers/sessions_controller.rb.tt +21 -0
- data/lib/rails/generators/rails/authentication/templates/app/mailers/passwords_mailer.rb.tt +6 -0
- data/lib/rails/generators/rails/authentication/templates/app/models/current.rb.tt +4 -0
- data/lib/rails/generators/rails/authentication/templates/app/models/session.rb.tt +3 -0
- data/lib/rails/generators/rails/authentication/templates/app/models/user.rb.tt +6 -0
- data/lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.html.erb.tt +4 -0
- data/lib/rails/generators/rails/authentication/templates/app/views/passwords_mailer/reset.text.erb.tt +2 -0
- data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +4 -0
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +1 -1
- data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +12 -2
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/Dockerfile.tt +1 -1
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/devcontainer.json.tt +5 -5
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +7 -9
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +6 -5
- data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +4 -4
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +5 -5
- data/lib/rails/generators/rails/script/USAGE +18 -0
- data/lib/rails/generators/rails/script/script_generator.rb +18 -0
- data/lib/rails/generators/rails/script/templates/script.rb.tt +3 -0
- data/lib/rails/generators/test_unit/authentication/authentication_generator.rb +18 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/fixtures/users.yml.tt +9 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb.tt +7 -0
- data/lib/rails/generators/test_unit/authentication/templates/test/models/user_test.rb.tt +7 -0
- data/lib/rails/generators.rb +6 -5
- data/lib/rails/health_controller.rb +2 -0
- data/lib/rails/info.rb +2 -1
- data/lib/rails/info_controller.rb +10 -4
- data/lib/rails/rack/silence_request.rb +33 -0
- data/lib/rails/rack.rb +1 -0
- data/lib/rails/source_annotation_extractor.rb +37 -16
- data/lib/rails/tasks/statistics.rake +13 -28
- data/lib/rails/templates/rails/info/notes.html.erb +65 -0
- data/lib/rails/templates/rails/mailers/email.html.erb +1 -1
- data/lib/rails/test_unit/line_filtering.rb +24 -3
- data/lib/rails/test_unit/reporter.rb +8 -4
- data/lib/rails/test_unit/runner.rb +8 -3
- data/lib/rails/test_unit/test_parser.rb +18 -15
- metadata +61 -27
- data/lib/rails/console/app.rb +0 -8
- data/lib/rails/console/helpers.rb +0 -8
- data/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt +0 -2
- data/lib/rails/generators/rails/app/templates/app/channels/application_cable/channel.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/app/channels/application_cable/connection.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +0 -70
- data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +0 -13
- data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +0 -13
- data/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js.tt +0 -10
- data/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js.tt +0 -6
- data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js.tt +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 664663d9e6513cdea42ce00026cfd1a3248e696a9410064f13e9e1de36e6b438
|
|
4
|
+
data.tar.gz: a81210cc416f95b59cce06656ecd36303e5c0be6c96e1430506d26b51c4e5f7c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d292ad13dee2d276f86fd1d96acc74a382b1c05c1063898895cfeda2a41fc7b3390901fbd89219c4f4036e84f2a2a0dc22efb5d302e766db602d88cb46e6dfd
|
|
7
|
+
data.tar.gz: 5298c4febcca27bc252e640f212d20e1d91f8715bbc993dac23777abff52687a03deba0789e5db1d850aba50ee0c22c35e073ffc0672fc0f7c649bc571327c75
|
data/CHANGELOG.md
CHANGED
|
@@ -1,381 +1,310 @@
|
|
|
1
|
-
## Rails
|
|
1
|
+
## Rails 8.0.5 (March 24, 2026) ##
|
|
2
2
|
|
|
3
|
-
*
|
|
3
|
+
* Fixed the `rails notes` command to properly extract notes in CSS files.
|
|
4
4
|
|
|
5
|
+
*David White*
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
* Fixed the default Dockerfile to properly include the `vendor/` directory during `bundle install`.
|
|
7
8
|
|
|
8
|
-
*
|
|
9
|
+
*Zhong Sheng*
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
## Rails
|
|
12
|
+
## Rails 8.0.4.1 (March 23, 2026) ##
|
|
12
13
|
|
|
13
14
|
* No changes.
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
## Rails
|
|
17
|
+
## Rails 8.0.4 (October 28, 2025) ##
|
|
17
18
|
|
|
18
19
|
* No changes.
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
## Rails
|
|
22
|
-
|
|
23
|
-
* Fix `rails console` for application with non default application constant.
|
|
22
|
+
## Rails 8.0.3 (September 22, 2025) ##
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
which is the default but not an obligation.
|
|
24
|
+
* Fix `polymorphic_url` and `polymorphic_path` not working when routes are not loaded.
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
*Édouard Chin*
|
|
29
27
|
|
|
30
|
-
* Fix
|
|
28
|
+
* Fix Rails console to not override user defined IRB_NAME.
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
run `rails dbconsole`.
|
|
30
|
+
Only change the prompt name if it hasn't been customized in `.irbrc`.
|
|
34
31
|
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
* Don't update public directory during `app:update` command for API-only Applications.
|
|
38
|
-
|
|
39
|
-
*y-yagi*
|
|
32
|
+
*Jarrett Lusso*
|
|
40
33
|
|
|
41
|
-
* Don't add bin/brakeman if brakeman is not in bundle when upgrading an application.
|
|
42
34
|
|
|
43
|
-
|
|
35
|
+
## Rails 8.0.2.1 (August 13, 2025) ##
|
|
44
36
|
|
|
45
|
-
*
|
|
37
|
+
* No changes.
|
|
46
38
|
|
|
47
|
-
*Jean Boussier*
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
## Rails 8.0.2 (March 12, 2025) ##
|
|
50
41
|
|
|
51
|
-
|
|
42
|
+
* Fix Rails console to load routes.
|
|
52
43
|
|
|
44
|
+
Otherwise `*_path` and `*url` methods are missing on the `app` object.
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
*Édouard Chin*
|
|
55
47
|
|
|
56
|
-
*
|
|
57
|
-
standard `-e/--environment` options.
|
|
48
|
+
* Update `rails new --minimal` option
|
|
58
49
|
|
|
59
|
-
|
|
50
|
+
Extend the `--minimal` flag to exclude recently added features:
|
|
51
|
+
`skip_brakeman`, `skip_ci`, `skip_docker`, `skip_kamal`, `skip_rubocop`, `skip_solid` and `skip_thruster`.
|
|
60
52
|
|
|
61
|
-
*
|
|
62
|
-
of the application. Usage:
|
|
53
|
+
*eelcoj*
|
|
63
54
|
|
|
64
|
-
|
|
55
|
+
* Use `secret_key_base` from ENV or credentials when present locally.
|
|
65
56
|
|
|
66
|
-
|
|
57
|
+
When ENV["SECRET_KEY_BASE"] or
|
|
58
|
+
`Rails.application.credentials.secret_key_base` is set for test or
|
|
59
|
+
development, it is used for the `Rails.config.secret_key_base`,
|
|
60
|
+
instead of generating a `tmp/local_secret.txt` file.
|
|
67
61
|
|
|
68
|
-
*
|
|
69
|
-
This can be skipped using --skip-rubocop and --skip-ci.
|
|
62
|
+
*Petrik de Heus*
|
|
70
63
|
|
|
71
|
-
*Chris Oliver*
|
|
72
64
|
|
|
73
|
-
|
|
74
|
-
`rails new` and `rails db:system:change` commands.
|
|
65
|
+
## Rails 8.0.1 (December 13, 2024) ##
|
|
75
66
|
|
|
76
|
-
|
|
67
|
+
* Skip generation system tests related code for CI when `--skip-system-test` is given.
|
|
77
68
|
|
|
78
|
-
*
|
|
69
|
+
*fatkodima*
|
|
79
70
|
|
|
80
|
-
*
|
|
71
|
+
* Don't add bin/thrust if thruster is not in Gemfile.
|
|
81
72
|
|
|
82
|
-
|
|
73
|
+
*Étienne Barrié*
|
|
83
74
|
|
|
84
|
-
|
|
85
|
-
* `--skip`: Refuse all changes to existing files
|
|
86
|
-
* `--pretend`: Don't make any changes
|
|
87
|
-
* `--quiet`: Don't output all changes made
|
|
75
|
+
* Don't install a package for system test when applications don't use it.
|
|
88
76
|
|
|
89
|
-
|
|
77
|
+
*y-yagi*
|
|
90
78
|
|
|
91
|
-
* Implement Rails console commands and helpers with IRB v1.13's extension APIs.
|
|
92
79
|
|
|
93
|
-
|
|
94
|
-
IRB help message's `Helper methods` category. And `reload!` command will be displayed under
|
|
95
|
-
the new `Rails console` commands category.
|
|
80
|
+
## Rails 8.0.0.1 (December 10, 2024) ##
|
|
96
81
|
|
|
97
|
-
|
|
98
|
-
private components and don't show up in its help message, which led to poor discoverability.
|
|
82
|
+
* No changes.
|
|
99
83
|
|
|
100
|
-
*Stan Lo*
|
|
101
84
|
|
|
102
|
-
|
|
85
|
+
## Rails 8.0.0 (November 07, 2024) ##
|
|
103
86
|
|
|
104
|
-
|
|
87
|
+
* No changes.
|
|
105
88
|
|
|
106
|
-
* Remove deprecated `find_cmd_and_exec` console helper.
|
|
107
89
|
|
|
108
|
-
|
|
90
|
+
## Rails 8.0.0.rc2 (October 30, 2024) ##
|
|
109
91
|
|
|
110
|
-
*
|
|
92
|
+
* Fix incorrect database.yml with `skip_solid`.
|
|
111
93
|
|
|
112
|
-
*
|
|
94
|
+
*Joé Dupuis*
|
|
113
95
|
|
|
114
|
-
*
|
|
96
|
+
* Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
|
|
115
97
|
|
|
116
98
|
*Rafael Mendonça França*
|
|
117
99
|
|
|
118
|
-
* Generated Gemfile will include `require: "debug/prelude"` for the `debug` gem.
|
|
119
100
|
|
|
120
|
-
|
|
121
|
-
additional overhead and memory usage even without entering a debugging session.
|
|
101
|
+
## Rails 8.0.0.rc1 (October 19, 2024) ##
|
|
122
102
|
|
|
123
|
-
|
|
124
|
-
to breakpoint methods like `debugger` or `binding.break`, but the debugger won't be
|
|
125
|
-
activated until a breakpoint is hit.
|
|
103
|
+
* Remove deprecated support to extend Rails console through `Rails::ConsoleMethods`.
|
|
126
104
|
|
|
127
|
-
*
|
|
105
|
+
*Rafael Mendonça França*
|
|
128
106
|
|
|
129
|
-
*
|
|
130
|
-
`--skip-test` option.
|
|
107
|
+
* Remove deprecated file `rails/console/helpers`.
|
|
131
108
|
|
|
132
|
-
*
|
|
109
|
+
*Rafael Mendonça França*
|
|
133
110
|
|
|
134
|
-
*
|
|
111
|
+
* Remove deprecated file `rails/console/app`.
|
|
135
112
|
|
|
136
|
-
*
|
|
113
|
+
*Rafael Mendonça França*
|
|
137
114
|
|
|
138
|
-
*
|
|
115
|
+
* Remove deprecated `config.read_encrypted_secrets`.
|
|
139
116
|
|
|
140
|
-
|
|
141
|
-
being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer.
|
|
117
|
+
*Rafael Mendonça França*
|
|
142
118
|
|
|
143
|
-
|
|
119
|
+
* Add Kamal support for devcontainers
|
|
144
120
|
|
|
145
|
-
|
|
121
|
+
Previously generated devcontainer could not use docker and therefore Kamal.
|
|
146
122
|
|
|
147
|
-
|
|
148
|
-
if a mailer included a url built with a `*_path` helper.
|
|
123
|
+
*Joé Dupuis*
|
|
149
124
|
|
|
150
|
-
*Steve Polito*
|
|
151
125
|
|
|
152
|
-
|
|
126
|
+
## Rails 8.0.0.beta1 (September 26, 2024) ##
|
|
153
127
|
|
|
154
|
-
|
|
128
|
+
* Exit `rails g` with code 1 if generator could not be found.
|
|
155
129
|
|
|
156
|
-
|
|
157
|
-
assert_initializer "mail_interceptors.rb"
|
|
158
|
-
```
|
|
130
|
+
Previously `rails g` returned 0, which would make it harder to catch typos in scripts calling `rails g`.
|
|
159
131
|
|
|
160
|
-
*
|
|
132
|
+
*Christopher Özbek*
|
|
161
133
|
|
|
162
|
-
*
|
|
134
|
+
* Remove `require_*` statements from application.css to align with the transition from Sprockets to Propshaft.
|
|
163
135
|
|
|
164
|
-
|
|
136
|
+
With Propshaft as the default asset pipeline in Rails 8, the require_tree and require_self clauses in application.css are no longer necessary, as they were specific to Sprockets. Additionally, the comment has been updated to clarify that CSS precedence now follows standard cascading order without automatic prioritization by the asset pipeline.
|
|
165
137
|
|
|
166
|
-
|
|
167
|
-
- A redis container for Kredis, ActionCable etc.
|
|
168
|
-
- A database (SQLite, Postgres, MySQL or MariaDB)
|
|
169
|
-
- A Headless chrome container for system tests
|
|
170
|
-
- Active Storage configured to use the local disk and with preview features working
|
|
138
|
+
*Eduardo Alencar*
|
|
171
139
|
|
|
172
|
-
|
|
140
|
+
* Do not include redis by default in generated Dev Containers.
|
|
173
141
|
|
|
174
|
-
|
|
142
|
+
Now that applications use the Solid Queue and Solid Cache gems by default, we do not need to include redis
|
|
143
|
+
in the Dev Container. We will only include redis if `--skip-solid` is used when generating an app that uses
|
|
144
|
+
Active Job or Action Cable.
|
|
175
145
|
|
|
176
|
-
|
|
146
|
+
When generating a Dev Container for an existing app, we will not include redis if either of the solid gems
|
|
147
|
+
are in use.
|
|
177
148
|
|
|
178
|
-
*
|
|
149
|
+
*Andrew Novoselac*
|
|
179
150
|
|
|
180
|
-
|
|
151
|
+
* Use [Solid Cable](https://github.com/rails/solid_cable) as the default Action Cable adapter in production, configured as a separate queue database in config/database.yml. It keeps messages in a table and continuously polls for updates. This makes it possible to drop the common dependency on Redis, if it isn't needed for any other purpose. Despite polling, the performance of Solid Cable is comparable to Redis in most situations. And in all circumstances, it makes it easier to deploy Rails when Redis is no longer a required dependency for Action Cable functionality.
|
|
181
152
|
|
|
182
|
-
|
|
183
|
-
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
|
184
|
-
served_by host: "testserver", port: 45678
|
|
185
|
-
end
|
|
186
|
-
```
|
|
153
|
+
*DHH*
|
|
187
154
|
|
|
188
|
-
|
|
155
|
+
* Use [Solid Queue](https://github.com/rails/solid_queue) as the default Active Job backend in production, configured as a separate queue database in config/database.yml. In a single-server deployment, it'll run as a Puma plugin. This is configured in `config/deploy.yml` and can easily be changed to use a dedicated jobs machine.
|
|
189
156
|
|
|
190
|
-
*
|
|
157
|
+
*DHH*
|
|
191
158
|
|
|
192
|
-
|
|
159
|
+
* Use [Solid Cache](https://github.com/rails/solid_cache) as the default Rails.cache backend in production, configured as a separate cache database in config/database.yml.
|
|
193
160
|
|
|
194
|
-
*
|
|
161
|
+
*DHH*
|
|
195
162
|
|
|
196
|
-
|
|
163
|
+
* Add Rails::Rack::SilenceRequest middleware and use it via `config.silence_healthcheck_path = path`
|
|
164
|
+
to silence requests to "/up". This prevents the Kamal-required health checks from clogging up
|
|
165
|
+
the production logs.
|
|
197
166
|
|
|
198
|
-
*
|
|
167
|
+
*DHH*
|
|
199
168
|
|
|
200
|
-
|
|
169
|
+
* Introduce `mariadb-mysql` and `mariadb-trilogy` database options for `rails new`
|
|
201
170
|
|
|
202
|
-
|
|
203
|
-
|
|
171
|
+
When used with the `--devcontainer` flag, these options will use `mariadb` as the database for the
|
|
172
|
+
Dev Container. The original `mysql` and `trilogy` options will use `mysql`. Users who are not
|
|
173
|
+
generating a Dev Container do not need to use the new options.
|
|
204
174
|
|
|
205
|
-
*
|
|
175
|
+
*Andrew Novoselac*
|
|
206
176
|
|
|
207
|
-
*
|
|
177
|
+
* Deprecate `::STATS_DIRECTORIES`.
|
|
208
178
|
|
|
209
|
-
|
|
179
|
+
The global constant `STATS_DIRECTORIES` has been deprecated in favor of
|
|
180
|
+
`Rails::CodeStatistics.register_directory`.
|
|
210
181
|
|
|
211
|
-
|
|
182
|
+
Add extra directories with `Rails::CodeStatistics.register_directory(label, path)`:
|
|
212
183
|
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
my-app(prod)> # for RAILS_ENV=production
|
|
217
|
-
my-app(my_env)> # for RAILS_ENV=my_env
|
|
184
|
+
```ruby
|
|
185
|
+
require "rails/code_statistics"
|
|
186
|
+
Rails::CodeStatistics.register_directory('My Directory', 'path/to/dir')
|
|
218
187
|
```
|
|
219
188
|
|
|
220
|
-
|
|
221
|
-
For example, `MyApp` will displayed as `my-app` in the prompt.
|
|
222
|
-
|
|
223
|
-
Additionally, the environment name will be colorized when the environment is
|
|
224
|
-
`development` (blue), `test` (blue), or `production` (red), if your
|
|
225
|
-
terminal supports it.
|
|
226
|
-
|
|
227
|
-
*Stan Lo*
|
|
228
|
-
|
|
229
|
-
* Ensure `autoload_paths`, `autoload_once_paths`, `eager_load_paths`, and
|
|
230
|
-
`load_paths` only have directories when initialized from engine defaults.
|
|
189
|
+
*Petrik de Heus*
|
|
231
190
|
|
|
232
|
-
|
|
191
|
+
* Enable query log tags by default on development env
|
|
233
192
|
|
|
234
|
-
|
|
193
|
+
This can be used to trace troublesome SQL statements back to the application
|
|
194
|
+
code that generated these statements. It is also useful when using multiple
|
|
195
|
+
databases because the query logs can identify which database is being used.
|
|
235
196
|
|
|
236
|
-
*
|
|
197
|
+
*Matheus Richard*
|
|
237
198
|
|
|
238
|
-
|
|
239
|
-
With this fix, application reloads according to `Rails.autoloaders.main.dirs`,
|
|
240
|
-
thereby preventing unnecessary reloads.
|
|
199
|
+
* Defer route drawing to the first request, or when url_helpers are called
|
|
241
200
|
|
|
242
|
-
|
|
201
|
+
Executes the first routes reload in middleware, or when a route set's
|
|
202
|
+
url_helpers receives a route call / asked if it responds to a route.
|
|
203
|
+
Previously, this was executed unconditionally on boot, which can
|
|
204
|
+
slow down boot time unnecessarily for larger apps with lots of routes.
|
|
243
205
|
|
|
244
|
-
|
|
206
|
+
Environments like production that have `config.eager_load = true` will
|
|
207
|
+
continue to eagerly load routes on boot.
|
|
245
208
|
|
|
246
|
-
*
|
|
209
|
+
*Gannon McGibbon*
|
|
247
210
|
|
|
248
|
-
*
|
|
211
|
+
* Generate form helpers to use `textarea*` methods instead of `text_area*` methods
|
|
249
212
|
|
|
250
|
-
*
|
|
251
|
-
|
|
252
|
-
* Set `config.action_view.annotate_rendered_view_with_filenames` to `true` in
|
|
253
|
-
the `development` environment.
|
|
254
|
-
|
|
255
|
-
*Adrian Marin*
|
|
213
|
+
*Sean Doyle*
|
|
256
214
|
|
|
257
|
-
*
|
|
215
|
+
* Add authentication generator to give a basic start to an authentication system using database-tracked sessions and password reset.
|
|
258
216
|
|
|
259
|
-
|
|
217
|
+
Generate with...
|
|
260
218
|
|
|
261
|
-
```sh
|
|
262
|
-
BACKTRACE=1 bin/rails server
|
|
263
219
|
```
|
|
264
|
-
|
|
265
|
-
*Alex Ghiculescu*
|
|
266
|
-
|
|
267
|
-
* Raise `ArgumentError` when reading `config.x.something` with arguments:
|
|
268
|
-
|
|
269
|
-
```ruby
|
|
270
|
-
config.x.this_works.this_raises true # raises ArgumentError
|
|
220
|
+
bin/rails generate authentication
|
|
271
221
|
```
|
|
272
222
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
* Add default PWA files for manifest and service-worker that are served from `app/views/pwa` and can be dynamically rendered through ERB. Mount these files explicitly at the root with default routes in the generated routes file.
|
|
276
|
-
|
|
277
|
-
*DHH*
|
|
223
|
+
Generated files:
|
|
278
224
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
225
|
+
```
|
|
226
|
+
app/models/current.rb
|
|
227
|
+
app/models/user.rb
|
|
228
|
+
app/models/session.rb
|
|
229
|
+
app/controllers/sessions_controller.rb
|
|
230
|
+
app/controllers/passwords_controller.rb
|
|
231
|
+
app/mailers/passwords_mailer.rb
|
|
232
|
+
app/views/sessions/new.html.erb
|
|
233
|
+
app/views/passwords/new.html.erb
|
|
234
|
+
app/views/passwords/edit.html.erb
|
|
235
|
+
app/views/passwords_mailer/reset.html.erb
|
|
236
|
+
app/views/passwords_mailer/reset.text.erb
|
|
237
|
+
db/migrate/xxxxxxx_create_users.rb
|
|
238
|
+
db/migrate/xxxxxxx_create_sessions.rb
|
|
239
|
+
test/mailers/previews/passwords_mailer_preview.rb
|
|
240
|
+
```
|
|
284
241
|
|
|
285
242
|
*DHH*
|
|
286
243
|
|
|
287
|
-
* Add Brakeman by default for static analysis of security vulnerabilities. Allow skipping with `--skip-brakeman option`.
|
|
288
|
-
|
|
289
|
-
*vipulnsward*
|
|
290
|
-
|
|
291
|
-
* Add RuboCop with rules from `rubocop-rails-omakase` by default. Skip with `--skip-rubocop`.
|
|
292
|
-
|
|
293
|
-
*DHH* and *zzak*
|
|
294
|
-
|
|
295
|
-
* Use `bin/rails runner --skip-executor` to not wrap the runner script with an
|
|
296
|
-
Executor.
|
|
297
|
-
|
|
298
|
-
*Ben Sheldon*
|
|
299
|
-
|
|
300
|
-
* Fix isolated engines to take `ActiveRecord::Base.table_name_prefix` into consideration.
|
|
301
|
-
|
|
302
|
-
This will allow for engine defined models, such as inside Active Storage, to respect
|
|
303
|
-
Active Record table name prefix configuration.
|
|
304
|
-
|
|
305
|
-
*Chedli Bourguiba*
|
|
306
|
-
|
|
307
|
-
* Fix running `db:system:change` when the app has no Dockerfile.
|
|
308
|
-
|
|
309
|
-
*Hartley McGuire*
|
|
310
|
-
|
|
311
|
-
* In Action Mailer previews, list inline attachments separately from normal
|
|
312
|
-
attachments.
|
|
313
244
|
|
|
314
|
-
|
|
245
|
+
* Add not-null type modifier to migration attributes.
|
|
315
246
|
|
|
316
|
-
|
|
247
|
+
Generating with...
|
|
317
248
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
*Christian Schmidt* and *Jonathan Hefner*
|
|
323
|
-
|
|
324
|
-
* In mailer preview, only show SMTP-To if it differs from the union of To, Cc and Bcc.
|
|
325
|
-
|
|
326
|
-
*Christian Schmidt*
|
|
327
|
-
|
|
328
|
-
* Enable YJIT by default on new applications running Ruby 3.3+.
|
|
329
|
-
|
|
330
|
-
This can be disabled by setting `Rails.application.config.yjit = false`
|
|
331
|
-
|
|
332
|
-
*Jean Boussier*, *Rafael Mendonça França*
|
|
249
|
+
```
|
|
250
|
+
bin/rails generate migration CreateUsers email_address:string!:uniq password_digest:string!
|
|
251
|
+
```
|
|
333
252
|
|
|
334
|
-
|
|
253
|
+
Produces:
|
|
335
254
|
|
|
336
|
-
|
|
255
|
+
```ruby
|
|
256
|
+
class CreateUsers < ActiveRecord::Migration[8.0]
|
|
257
|
+
def change
|
|
258
|
+
create_table :users do |t|
|
|
259
|
+
t.string :email_address, null: false
|
|
260
|
+
t.string :password_digest, null: false
|
|
261
|
+
|
|
262
|
+
t.timestamps
|
|
263
|
+
end
|
|
264
|
+
add_index :users, :email_address, unique: true
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
```
|
|
337
268
|
|
|
338
|
-
*
|
|
269
|
+
*DHH*
|
|
339
270
|
|
|
340
|
-
|
|
271
|
+
* Add a `script` folder to applications, and a scripts generator.
|
|
341
272
|
|
|
342
|
-
|
|
273
|
+
The new `script` folder is meant to hold one-off or general purpose scripts,
|
|
274
|
+
such as data migration scripts, cleanup scripts, etc.
|
|
343
275
|
|
|
344
|
-
|
|
345
|
-
by name instead of UID:GID. This can cause the following error in Kubernetes:
|
|
276
|
+
A new script generator allows you to create such scripts:
|
|
346
277
|
|
|
347
278
|
```
|
|
348
|
-
|
|
279
|
+
bin/rails generate script my_script
|
|
280
|
+
bin/rails generate script data/backfill
|
|
349
281
|
```
|
|
350
282
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
*Ivan Fedotov*
|
|
283
|
+
You can run the generated script using:
|
|
354
284
|
|
|
355
|
-
|
|
285
|
+
```
|
|
286
|
+
bundle exec ruby script/my_script.rb
|
|
287
|
+
bundle exec ruby script/data/backfill.rb
|
|
288
|
+
```
|
|
356
289
|
|
|
357
|
-
|
|
358
|
-
for `rails new` take different arguments. This change validates them.
|
|
290
|
+
*Jerome Dalbert*, *Haroon Ahmed*
|
|
359
291
|
|
|
360
|
-
|
|
292
|
+
* Deprecate `bin/rake stats` in favor of `bin/rails stats`.
|
|
361
293
|
|
|
362
|
-
*
|
|
294
|
+
*Juan Vásquez*
|
|
363
295
|
|
|
364
|
-
|
|
365
|
-
generator tests, we add the ability to conditionally print `$stdout`
|
|
366
|
-
instead of capturing it.
|
|
296
|
+
* Add internal page `/rails/info/notes`, that displays the same information as `bin/rails notes`.
|
|
367
297
|
|
|
368
|
-
|
|
298
|
+
*Deepak Mahakale*
|
|
369
299
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
```
|
|
300
|
+
* Add Rubocop and GitHub Actions to plugin generator.
|
|
301
|
+
This can be skipped using --skip-rubocop and --skip-ci.
|
|
373
302
|
|
|
374
|
-
*
|
|
303
|
+
*Chris Oliver*
|
|
375
304
|
|
|
376
|
-
*
|
|
377
|
-
|
|
305
|
+
* Use Kamal for deployment by default, which includes generating a Rails-specific config/deploy.yml.
|
|
306
|
+
This can be skipped using --skip-kamal. See more: https://kamal-deploy.org/
|
|
378
307
|
|
|
379
|
-
*
|
|
308
|
+
*DHH*
|
|
380
309
|
|
|
381
|
-
Please check [7-
|
|
310
|
+
Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/railties/CHANGELOG.md) for previous changes.
|
data/README.rdoc
CHANGED
|
@@ -34,6 +34,6 @@ Bug reports can be filed for the Ruby on \Rails project here:
|
|
|
34
34
|
|
|
35
35
|
* https://github.com/rails/rails/issues
|
|
36
36
|
|
|
37
|
-
Feature requests should be discussed on the
|
|
37
|
+
Feature requests should be discussed on the rubyonrails-core forum here:
|
|
38
38
|
|
|
39
39
|
* https://discuss.rubyonrails.org/c/rubyonrails-core
|
|
@@ -25,7 +25,7 @@ module Minitest
|
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
class ProfileReporter <
|
|
28
|
+
class ProfileReporter < Reporter
|
|
29
29
|
def initialize(io = $stdout, options = {})
|
|
30
30
|
super
|
|
31
31
|
@results = []
|
|
@@ -80,6 +80,13 @@ module Minitest
|
|
|
80
80
|
options[:fail_fast] = true
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
+
if Minitest::VERSION > "6" then
|
|
84
|
+
opts.on "-n", "--name PATTERN", "Include /regexp/ or string for run." do |a|
|
|
85
|
+
warn "Please switch from -n/--name to -i/--include"
|
|
86
|
+
options[:include] = a
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
83
90
|
opts.on("-c", "--[no-]color", "Enable color in the output") do |value|
|
|
84
91
|
options[:color] = value
|
|
85
92
|
end
|
|
@@ -110,7 +117,7 @@ module Minitest
|
|
|
110
117
|
# minitest-reporters, maxitest, and others.
|
|
111
118
|
def self.plugin_rails_init(options)
|
|
112
119
|
# Don't mess with Minitest unless RAILS_ENV is set
|
|
113
|
-
return unless ENV["RAILS_ENV"]
|
|
120
|
+
return unless ENV["RAILS_ENV"] || ENV["RAILS_MINITEST_PLUGIN"]
|
|
114
121
|
|
|
115
122
|
unless options[:full_backtrace]
|
|
116
123
|
# Plugin can run without Rails loaded, check before filtering.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "fileutils"
|
|
4
|
-
require "set"
|
|
5
4
|
require "active_support/notifications"
|
|
6
5
|
require "active_support/dependencies"
|
|
7
6
|
require "active_support/descendants_tracker"
|
|
@@ -60,9 +59,7 @@ module Rails
|
|
|
60
59
|
end
|
|
61
60
|
else
|
|
62
61
|
Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase)
|
|
63
|
-
|
|
64
|
-
broadcast_logger.formatter = Rails.logger.formatter
|
|
65
|
-
Rails.logger = broadcast_logger
|
|
62
|
+
Rails.logger = ActiveSupport::BroadcastLogger.new(Rails.logger)
|
|
66
63
|
end
|
|
67
64
|
end
|
|
68
65
|
|