railties 7.2.2.2 → 8.0.3
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 +159 -256
- data/README.rdoc +1 -1
- data/lib/minitest/rails_plugin.rb +2 -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 +67 -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 +22 -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 +11 -3
- 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/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 +4 -4
- 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 +4 -3
- 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 +31 -14
- 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/runner.rb +8 -3
- data/lib/rails/test_unit/test_parser.rb +18 -15
- metadata +59 -22
- 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: 46e1da3cb0dd9f90ba6539fcd48b08a77155300031522c2a1d37c70b4c05ea6e
|
|
4
|
+
data.tar.gz: 8960aaa617926a966e515999e10668b5582a773a132de7cd2575088bc6017490
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3121cd89de8c287937ac033cb0e3bd902fc34d318b857e4176db1fbba562438bfd14e3ebaa669c09adf667ada86c70d84350cf08361bf1949ef1e98be9e2416a
|
|
7
|
+
data.tar.gz: d09a14c83c7fc1c9e752a52358f8343dc2d49b73ae5387a621c33774828bde8fdccac1a349b32c09205913ecd8e2019b8cfa748b778ed248a49adba06cc493fd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,386 +1,289 @@
|
|
|
1
|
-
## Rails
|
|
2
|
-
|
|
3
|
-
* No changes.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Rails 7.2.2.1 (December 10, 2024) ##
|
|
7
|
-
|
|
8
|
-
* No changes.
|
|
1
|
+
## Rails 8.0.3 (September 22, 2025) ##
|
|
9
2
|
|
|
3
|
+
* Fix `polymorphic_url` and `polymorphic_path` not working when routes are not loaded.
|
|
10
4
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* No changes.
|
|
5
|
+
*Édouard Chin*
|
|
14
6
|
|
|
7
|
+
* Fix Rails console to not override user defined IRB_NAME.
|
|
15
8
|
|
|
16
|
-
|
|
9
|
+
Only change the prompt name if it hasn't been customized in `.irbrc`.
|
|
17
10
|
|
|
18
|
-
*
|
|
11
|
+
*Jarrett Lusso*
|
|
19
12
|
|
|
20
13
|
|
|
21
|
-
## Rails
|
|
14
|
+
## Rails 8.0.2.1 (August 13, 2025) ##
|
|
22
15
|
|
|
23
16
|
* No changes.
|
|
24
17
|
|
|
25
18
|
|
|
26
|
-
## Rails
|
|
19
|
+
## Rails 8.0.2 (March 12, 2025) ##
|
|
27
20
|
|
|
28
|
-
* Fix
|
|
21
|
+
* Fix Rails console to load routes.
|
|
29
22
|
|
|
30
|
-
|
|
31
|
-
which is the default but not an obligation.
|
|
23
|
+
Otherwise `*_path` and `*url` methods are missing on the `app` object.
|
|
32
24
|
|
|
33
|
-
|
|
25
|
+
*Édouard Chin*
|
|
34
26
|
|
|
35
|
-
*
|
|
27
|
+
* Update `rails new --minimal` option
|
|
36
28
|
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
Extend the `--minimal` flag to exclude recently added features:
|
|
30
|
+
`skip_brakeman`, `skip_ci`, `skip_docker`, `skip_kamal`, `skip_rubocop`, `skip_solid` and `skip_thruster`.
|
|
39
31
|
|
|
40
|
-
*
|
|
32
|
+
*eelcoj*
|
|
41
33
|
|
|
42
|
-
*
|
|
34
|
+
* Use `secret_key_base` from ENV or credentials when present locally.
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
When ENV["SECRET_KEY_BASE"] or
|
|
37
|
+
`Rails.application.credentials.secret_key_base` is set for test or
|
|
38
|
+
development, it is used for the `Rails.config.secret_key_base`,
|
|
39
|
+
instead of generating a `tmp/local_secret.txt` file.
|
|
47
40
|
|
|
48
|
-
*
|
|
41
|
+
*Petrik de Heus*
|
|
49
42
|
|
|
50
|
-
* Remove PWA views and routes if its an API only project.
|
|
51
43
|
|
|
52
|
-
|
|
44
|
+
## Rails 8.0.1 (December 13, 2024) ##
|
|
53
45
|
|
|
54
|
-
*
|
|
46
|
+
* Skip generation system tests related code for CI when `--skip-system-test` is given.
|
|
55
47
|
|
|
56
|
-
*
|
|
48
|
+
*fatkodima*
|
|
57
49
|
|
|
50
|
+
* Don't add bin/thrust if thruster is not in Gemfile.
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
*Étienne Barrié*
|
|
60
53
|
|
|
61
|
-
*
|
|
62
|
-
standard `-e/--environment` options.
|
|
54
|
+
* Don't install a package for system test when applications don't use it.
|
|
63
55
|
|
|
64
|
-
*
|
|
56
|
+
*y-yagi*
|
|
65
57
|
|
|
66
|
-
* Create a Dev Container Generator that generates a Dev Container setup based on the current configuration
|
|
67
|
-
of the application. Usage:
|
|
68
58
|
|
|
69
|
-
|
|
59
|
+
## Rails 8.0.0.1 (December 10, 2024) ##
|
|
70
60
|
|
|
71
|
-
|
|
61
|
+
* No changes.
|
|
72
62
|
|
|
73
|
-
* Add Rubocop and GitHub Actions to plugin generator.
|
|
74
|
-
This can be skipped using --skip-rubocop and --skip-ci.
|
|
75
63
|
|
|
76
|
-
|
|
64
|
+
## Rails 8.0.0 (November 07, 2024) ##
|
|
77
65
|
|
|
78
|
-
*
|
|
79
|
-
`rails new` and `rails db:system:change` commands.
|
|
66
|
+
* No changes.
|
|
80
67
|
|
|
81
|
-
The supported options are `sqlite3`, `mysql`, `postgresql` and `trilogy`.
|
|
82
68
|
|
|
83
|
-
|
|
69
|
+
## Rails 8.0.0.rc2 (October 30, 2024) ##
|
|
84
70
|
|
|
85
|
-
*
|
|
71
|
+
* Fix incorrect database.yml with `skip_solid`.
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
*Joé Dupuis*
|
|
88
74
|
|
|
89
|
-
|
|
90
|
-
* `--skip`: Refuse all changes to existing files
|
|
91
|
-
* `--pretend`: Don't make any changes
|
|
92
|
-
* `--quiet`: Don't output all changes made
|
|
75
|
+
* Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
|
|
93
76
|
|
|
94
|
-
|
|
77
|
+
*Rafael Mendonça França*
|
|
95
78
|
|
|
96
|
-
* Implement Rails console commands and helpers with IRB v1.13's extension APIs.
|
|
97
79
|
|
|
98
|
-
|
|
99
|
-
IRB help message's `Helper methods` category. And `reload!` command will be displayed under
|
|
100
|
-
the new `Rails console` commands category.
|
|
80
|
+
## Rails 8.0.0.rc1 (October 19, 2024) ##
|
|
101
81
|
|
|
102
|
-
|
|
103
|
-
private components and don't show up in its help message, which led to poor discoverability.
|
|
82
|
+
* Remove deprecated support to extend Rails console through `Rails::ConsoleMethods`.
|
|
104
83
|
|
|
105
|
-
*
|
|
84
|
+
*Rafael Mendonça França*
|
|
106
85
|
|
|
107
|
-
* Remove deprecated `
|
|
86
|
+
* Remove deprecated file `rails/console/helpers`.
|
|
108
87
|
|
|
109
88
|
*Rafael Mendonça França*
|
|
110
89
|
|
|
111
|
-
* Remove deprecated `
|
|
90
|
+
* Remove deprecated file `rails/console/app`.
|
|
112
91
|
|
|
113
92
|
*Rafael Mendonça França*
|
|
114
93
|
|
|
115
|
-
* Remove deprecated `
|
|
94
|
+
* Remove deprecated `config.read_encrypted_secrets`.
|
|
116
95
|
|
|
117
96
|
*Rafael Mendonça França*
|
|
118
97
|
|
|
119
|
-
*
|
|
98
|
+
* Add Kamal support for devcontainers
|
|
120
99
|
|
|
121
|
-
|
|
100
|
+
Previously generated devcontainer could not use docker and therefore Kamal.
|
|
122
101
|
|
|
123
|
-
*
|
|
102
|
+
*Joé Dupuis*
|
|
124
103
|
|
|
125
|
-
Requiring `debug` gem directly automatically activates it, which could introduce
|
|
126
|
-
additional overhead and memory usage even without entering a debugging session.
|
|
127
104
|
|
|
128
|
-
|
|
129
|
-
to breakpoint methods like `debugger` or `binding.break`, but the debugger won't be
|
|
130
|
-
activated until a breakpoint is hit.
|
|
105
|
+
## Rails 8.0.0.beta1 (September 26, 2024) ##
|
|
131
106
|
|
|
132
|
-
|
|
107
|
+
* Exit `rails g` with code 1 if generator could not be found.
|
|
133
108
|
|
|
134
|
-
|
|
135
|
-
`--skip-test` option.
|
|
109
|
+
Previously `rails g` returned 0, which would make it harder to catch typos in scripts calling `rails g`.
|
|
136
110
|
|
|
137
|
-
*
|
|
111
|
+
*Christopher Özbek*
|
|
138
112
|
|
|
139
|
-
*
|
|
113
|
+
* Remove `require_*` statements from application.css to align with the transition from Sprockets to Propshaft.
|
|
140
114
|
|
|
141
|
-
|
|
115
|
+
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.
|
|
142
116
|
|
|
143
|
-
*
|
|
117
|
+
*Eduardo Alencar*
|
|
144
118
|
|
|
145
|
-
|
|
146
|
-
being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer.
|
|
119
|
+
* Do not include redis by default in generated Dev Containers.
|
|
147
120
|
|
|
148
|
-
|
|
121
|
+
Now that applications use the Solid Queue and Solid Cache gems by default, we do not need to include redis
|
|
122
|
+
in the Dev Container. We will only include redis if `--skip-solid` is used when generating an app that uses
|
|
123
|
+
Active Job or Action Cable.
|
|
149
124
|
|
|
150
|
-
|
|
125
|
+
When generating a Dev Container for an existing app, we will not include redis if either of the solid gems
|
|
126
|
+
are in use.
|
|
151
127
|
|
|
152
|
-
|
|
153
|
-
if a mailer included a url built with a `*_path` helper.
|
|
128
|
+
*Andrew Novoselac*
|
|
154
129
|
|
|
155
|
-
|
|
130
|
+
* 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.
|
|
156
131
|
|
|
157
|
-
*
|
|
132
|
+
*DHH*
|
|
158
133
|
|
|
159
|
-
|
|
134
|
+
* 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.
|
|
160
135
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
136
|
+
*DHH*
|
|
137
|
+
|
|
138
|
+
* 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.
|
|
164
139
|
|
|
165
|
-
*
|
|
140
|
+
*DHH*
|
|
166
141
|
|
|
167
|
-
*
|
|
142
|
+
* Add Rails::Rack::SilenceRequest middleware and use it via `config.silence_healthcheck_path = path`
|
|
143
|
+
to silence requests to "/up". This prevents the Kamal-required health checks from clogging up
|
|
144
|
+
the production logs.
|
|
168
145
|
|
|
169
|
-
|
|
146
|
+
*DHH*
|
|
170
147
|
|
|
171
|
-
|
|
172
|
-
- A redis container for Kredis, ActionCable etc.
|
|
173
|
-
- A database (SQLite, Postgres, MySQL or MariaDB)
|
|
174
|
-
- A Headless chrome container for system tests
|
|
175
|
-
- Active Storage configured to use the local disk and with preview features working
|
|
148
|
+
* Introduce `mariadb-mysql` and `mariadb-trilogy` database options for `rails new`
|
|
176
149
|
|
|
177
|
-
|
|
150
|
+
When used with the `--devcontainer` flag, these options will use `mariadb` as the database for the
|
|
151
|
+
Dev Container. The original `mysql` and `trilogy` options will use `mysql`. Users who are not
|
|
152
|
+
generating a Dev Container do not need to use the new options.
|
|
178
153
|
|
|
179
|
-
|
|
154
|
+
*Andrew Novoselac*
|
|
180
155
|
|
|
181
|
-
|
|
156
|
+
* Deprecate `::STATS_DIRECTORIES`.
|
|
182
157
|
|
|
183
|
-
|
|
158
|
+
The global constant `STATS_DIRECTORIES` has been deprecated in favor of
|
|
159
|
+
`Rails::CodeStatistics.register_directory`.
|
|
184
160
|
|
|
185
|
-
|
|
161
|
+
Add extra directories with `Rails::CodeStatistics.register_directory(label, path)`:
|
|
186
162
|
|
|
187
163
|
```ruby
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
end
|
|
164
|
+
require "rails/code_statistics"
|
|
165
|
+
Rails::CodeStatistics.register_directory('My Directory', 'path/to/dir')
|
|
191
166
|
```
|
|
192
167
|
|
|
193
|
-
*
|
|
168
|
+
*Petrik de Heus*
|
|
194
169
|
|
|
195
|
-
*
|
|
170
|
+
* Enable query log tags by default on development env
|
|
196
171
|
|
|
197
|
-
|
|
172
|
+
This can be used to trace troublesome SQL statements back to the application
|
|
173
|
+
code that generated these statements. It is also useful when using multiple
|
|
174
|
+
databases because the query logs can identify which database is being used.
|
|
198
175
|
|
|
199
|
-
*
|
|
176
|
+
*Matheus Richard*
|
|
200
177
|
|
|
201
|
-
|
|
178
|
+
* Defer route drawing to the first request, or when url_helpers are called
|
|
202
179
|
|
|
203
|
-
|
|
180
|
+
Executes the first routes reload in middleware, or when a route set's
|
|
181
|
+
url_helpers receives a route call / asked if it responds to a route.
|
|
182
|
+
Previously, this was executed unconditionally on boot, which can
|
|
183
|
+
slow down boot time unnecessarily for larger apps with lots of routes.
|
|
204
184
|
|
|
205
|
-
|
|
185
|
+
Environments like production that have `config.eager_load = true` will
|
|
186
|
+
continue to eagerly load routes on boot.
|
|
206
187
|
|
|
207
|
-
*
|
|
208
|
-
rails new generator command. Update ARGVScrubber to ignore text after `#` symbols.
|
|
188
|
+
*Gannon McGibbon*
|
|
209
189
|
|
|
210
|
-
|
|
190
|
+
* Generate form helpers to use `textarea*` methods instead of `text_area*` methods
|
|
211
191
|
|
|
212
|
-
*
|
|
192
|
+
*Sean Doyle*
|
|
213
193
|
|
|
214
|
-
|
|
194
|
+
* Add authentication generator to give a basic start to an authentication system using database-tracked sessions and password reset.
|
|
215
195
|
|
|
216
|
-
|
|
196
|
+
Generate with...
|
|
217
197
|
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
my-app(test)> # for RAILS_ENV=test
|
|
221
|
-
my-app(prod)> # for RAILS_ENV=production
|
|
222
|
-
my-app(my_env)> # for RAILS_ENV=my_env
|
|
198
|
+
```
|
|
199
|
+
bin/rails generate authentication
|
|
223
200
|
```
|
|
224
201
|
|
|
225
|
-
|
|
226
|
-
For example, `MyApp` will displayed as `my-app` in the prompt.
|
|
227
|
-
|
|
228
|
-
Additionally, the environment name will be colorized when the environment is
|
|
229
|
-
`development` (blue), `test` (blue), or `production` (red), if your
|
|
230
|
-
terminal supports it.
|
|
231
|
-
|
|
232
|
-
*Stan Lo*
|
|
233
|
-
|
|
234
|
-
* Ensure `autoload_paths`, `autoload_once_paths`, `eager_load_paths`, and
|
|
235
|
-
`load_paths` only have directories when initialized from engine defaults.
|
|
236
|
-
|
|
237
|
-
Previously, files under the `app` directory could end up there too.
|
|
238
|
-
|
|
239
|
-
*Takumasa Ochi*
|
|
240
|
-
|
|
241
|
-
* Prevent unnecessary application reloads in development.
|
|
242
|
-
|
|
243
|
-
Previously, some files outside autoload paths triggered unnecessary reloads.
|
|
244
|
-
With this fix, application reloads according to `Rails.autoloaders.main.dirs`,
|
|
245
|
-
thereby preventing unnecessary reloads.
|
|
246
|
-
|
|
247
|
-
*Takumasa Ochi*
|
|
248
|
-
|
|
249
|
-
* Use `oven-sh/setup-bun` in GitHub CI when generating an app with Bun.
|
|
250
|
-
|
|
251
|
-
*TangRufus*
|
|
252
|
-
|
|
253
|
-
* Disable `pidfile` generation in the `production` environment.
|
|
202
|
+
Generated files:
|
|
254
203
|
|
|
255
|
-
|
|
204
|
+
```
|
|
205
|
+
app/models/current.rb
|
|
206
|
+
app/models/user.rb
|
|
207
|
+
app/models/session.rb
|
|
208
|
+
app/controllers/sessions_controller.rb
|
|
209
|
+
app/controllers/passwords_controller.rb
|
|
210
|
+
app/mailers/passwords_mailer.rb
|
|
211
|
+
app/views/sessions/new.html.erb
|
|
212
|
+
app/views/passwords/new.html.erb
|
|
213
|
+
app/views/passwords/edit.html.erb
|
|
214
|
+
app/views/passwords_mailer/reset.html.erb
|
|
215
|
+
app/views/passwords_mailer/reset.text.erb
|
|
216
|
+
db/migrate/xxxxxxx_create_users.rb
|
|
217
|
+
db/migrate/xxxxxxx_create_sessions.rb
|
|
218
|
+
test/mailers/previews/passwords_mailer_preview.rb
|
|
219
|
+
```
|
|
256
220
|
|
|
257
|
-
*
|
|
258
|
-
the `development` environment.
|
|
221
|
+
*DHH*
|
|
259
222
|
|
|
260
|
-
*Adrian Marin*
|
|
261
223
|
|
|
262
|
-
*
|
|
224
|
+
* Add not-null type modifier to migration attributes.
|
|
263
225
|
|
|
264
|
-
|
|
226
|
+
Generating with...
|
|
265
227
|
|
|
266
|
-
```
|
|
267
|
-
|
|
228
|
+
```
|
|
229
|
+
bin/rails generate migration CreateUsers email_address:string!:uniq password_digest:string!
|
|
268
230
|
```
|
|
269
231
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
* Raise `ArgumentError` when reading `config.x.something` with arguments:
|
|
232
|
+
Produces:
|
|
273
233
|
|
|
274
234
|
```ruby
|
|
275
|
-
|
|
235
|
+
class CreateUsers < ActiveRecord::Migration[8.0]
|
|
236
|
+
def change
|
|
237
|
+
create_table :users do |t|
|
|
238
|
+
t.string :email_address, null: false
|
|
239
|
+
t.string :password_digest, null: false
|
|
240
|
+
|
|
241
|
+
t.timestamps
|
|
242
|
+
end
|
|
243
|
+
add_index :users, :email_address, unique: true
|
|
244
|
+
end
|
|
245
|
+
end
|
|
276
246
|
```
|
|
277
247
|
|
|
278
|
-
*Sean Doyle*
|
|
279
|
-
|
|
280
|
-
* 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.
|
|
281
|
-
|
|
282
|
-
*DHH*
|
|
283
|
-
|
|
284
|
-
* Updated system tests to now use headless Chrome by default for the new applications.
|
|
285
|
-
|
|
286
|
-
*DHH*
|
|
287
|
-
|
|
288
|
-
* Add GitHub CI files for Dependabot, Brakeman, RuboCop, and running tests by default. Can be skipped with `--skip-ci`.
|
|
289
|
-
|
|
290
248
|
*DHH*
|
|
291
249
|
|
|
292
|
-
* Add
|
|
293
|
-
|
|
294
|
-
*vipulnsward*
|
|
295
|
-
|
|
296
|
-
* Add RuboCop with rules from `rubocop-rails-omakase` by default. Skip with `--skip-rubocop`.
|
|
297
|
-
|
|
298
|
-
*DHH* and *zzak*
|
|
299
|
-
|
|
300
|
-
* Use `bin/rails runner --skip-executor` to not wrap the runner script with an
|
|
301
|
-
Executor.
|
|
302
|
-
|
|
303
|
-
*Ben Sheldon*
|
|
304
|
-
|
|
305
|
-
* Fix isolated engines to take `ActiveRecord::Base.table_name_prefix` into consideration.
|
|
306
|
-
|
|
307
|
-
This will allow for engine defined models, such as inside Active Storage, to respect
|
|
308
|
-
Active Record table name prefix configuration.
|
|
309
|
-
|
|
310
|
-
*Chedli Bourguiba*
|
|
311
|
-
|
|
312
|
-
* Fix running `db:system:change` when the app has no Dockerfile.
|
|
313
|
-
|
|
314
|
-
*Hartley McGuire*
|
|
250
|
+
* Add a `script` folder to applications, and a scripts generator.
|
|
315
251
|
|
|
316
|
-
|
|
317
|
-
|
|
252
|
+
The new `script` folder is meant to hold one-off or general purpose scripts,
|
|
253
|
+
such as data migration scripts, cleanup scripts, etc.
|
|
318
254
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
> Attachments: logo.png file1.pdf file2.pdf
|
|
322
|
-
|
|
323
|
-
will now be listed like
|
|
324
|
-
|
|
325
|
-
> Attachments: file1.pdf file2.pdf (Inline: logo.png)
|
|
326
|
-
|
|
327
|
-
*Christian Schmidt* and *Jonathan Hefner*
|
|
328
|
-
|
|
329
|
-
* In mailer preview, only show SMTP-To if it differs from the union of To, Cc and Bcc.
|
|
330
|
-
|
|
331
|
-
*Christian Schmidt*
|
|
332
|
-
|
|
333
|
-
* Enable YJIT by default on new applications running Ruby 3.3+.
|
|
334
|
-
|
|
335
|
-
This can be disabled by setting `Rails.application.config.yjit = false`
|
|
336
|
-
|
|
337
|
-
*Jean Boussier*, *Rafael Mendonça França*
|
|
338
|
-
|
|
339
|
-
* In Action Mailer previews, show date from message `Date` header if present.
|
|
340
|
-
|
|
341
|
-
*Sampat Badhe*
|
|
342
|
-
|
|
343
|
-
* Exit with non-zero status when the migration generator fails.
|
|
344
|
-
|
|
345
|
-
*Katsuhiko YOSHIDA*
|
|
346
|
-
|
|
347
|
-
* Use numeric UID and GID in Dockerfile template.
|
|
348
|
-
|
|
349
|
-
The Dockerfile generated by `rails new` sets the default user and group
|
|
350
|
-
by name instead of UID:GID. This can cause the following error in Kubernetes:
|
|
255
|
+
A new script generator allows you to create such scripts:
|
|
351
256
|
|
|
352
257
|
```
|
|
353
|
-
|
|
258
|
+
bin/rails generate script my_script
|
|
259
|
+
bin/rails generate script data/backfill
|
|
354
260
|
```
|
|
355
261
|
|
|
356
|
-
|
|
262
|
+
You can run the generated script using:
|
|
357
263
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
264
|
+
```
|
|
265
|
+
bundle exec ruby script/my_script.rb
|
|
266
|
+
bundle exec ruby script/data/backfill.rb
|
|
267
|
+
```
|
|
361
268
|
|
|
362
|
-
|
|
363
|
-
for `rails new` take different arguments. This change validates them.
|
|
269
|
+
*Jerome Dalbert*, *Haroon Ahmed*
|
|
364
270
|
|
|
365
|
-
|
|
271
|
+
* Deprecate `bin/rake stats` in favor of `bin/rails stats`.
|
|
366
272
|
|
|
367
|
-
*
|
|
273
|
+
*Juan Vásquez*
|
|
368
274
|
|
|
369
|
-
|
|
370
|
-
generator tests, we add the ability to conditionally print `$stdout`
|
|
371
|
-
instead of capturing it.
|
|
275
|
+
* Add internal page `/rails/info/notes`, that displays the same information as `bin/rails notes`.
|
|
372
276
|
|
|
373
|
-
|
|
277
|
+
*Deepak Mahakale*
|
|
374
278
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
```
|
|
279
|
+
* Add Rubocop and GitHub Actions to plugin generator.
|
|
280
|
+
This can be skipped using --skip-rubocop and --skip-ci.
|
|
378
281
|
|
|
379
|
-
*
|
|
282
|
+
*Chris Oliver*
|
|
380
283
|
|
|
381
|
-
*
|
|
382
|
-
|
|
284
|
+
* Use Kamal for deployment by default, which includes generating a Rails-specific config/deploy.yml.
|
|
285
|
+
This can be skipped using --skip-kamal. See more: https://kamal-deploy.org/
|
|
383
286
|
|
|
384
|
-
*
|
|
287
|
+
*DHH*
|
|
385
288
|
|
|
386
|
-
Please check [7-
|
|
289
|
+
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 = []
|
|
@@ -110,7 +110,7 @@ module Minitest
|
|
|
110
110
|
# minitest-reporters, maxitest, and others.
|
|
111
111
|
def self.plugin_rails_init(options)
|
|
112
112
|
# Don't mess with Minitest unless RAILS_ENV is set
|
|
113
|
-
return unless ENV["RAILS_ENV"]
|
|
113
|
+
return unless ENV["RAILS_ENV"] || ENV["RAILS_MINITEST_PLUGIN"]
|
|
114
114
|
|
|
115
115
|
unless options[:full_backtrace]
|
|
116
116
|
# 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
|
|