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