railties 7.0.8.7 → 7.2.2.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 +210 -272
- data/MIT-LICENSE +1 -1
- data/RDOC_MAIN.md +99 -0
- data/README.rdoc +4 -4
- data/lib/minitest/rails_plugin.rb +67 -1
- data/lib/rails/all.rb +1 -3
- data/lib/rails/api/task.rb +39 -6
- data/lib/rails/application/bootstrap.rb +28 -10
- data/lib/rails/application/configuration.rb +228 -72
- data/lib/rails/application/default_middleware_stack.rb +8 -2
- data/lib/rails/application/dummy_config.rb +19 -0
- data/lib/rails/application/finisher.rb +50 -33
- data/lib/rails/application.rb +117 -76
- data/lib/rails/backtrace_cleaner.rb +19 -4
- data/lib/rails/cli.rb +5 -3
- data/lib/rails/command/actions.rb +10 -12
- data/lib/rails/command/base.rb +55 -53
- data/lib/rails/command/environment_argument.rb +32 -16
- data/lib/rails/command/helpers/editor.rb +17 -12
- data/lib/rails/command.rb +84 -33
- data/lib/rails/commands/about/about_command.rb +14 -0
- data/lib/rails/commands/app/update_command.rb +102 -0
- data/lib/rails/commands/application/application_command.rb +2 -0
- data/lib/rails/commands/boot/boot_command.rb +14 -0
- data/lib/rails/commands/console/console_command.rb +11 -30
- data/lib/rails/commands/console/irb_console.rb +146 -0
- data/lib/rails/commands/credentials/USAGE +53 -55
- data/lib/rails/commands/credentials/credentials_command/diffing.rb +5 -3
- data/lib/rails/commands/credentials/credentials_command.rb +64 -70
- data/lib/rails/commands/db/system/change/change_command.rb +2 -1
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +32 -131
- data/lib/rails/commands/destroy/destroy_command.rb +3 -2
- data/lib/rails/commands/dev/dev_command.rb +1 -6
- data/lib/rails/commands/devcontainer/devcontainer_command.rb +39 -0
- data/lib/rails/commands/encrypted/USAGE +15 -20
- data/lib/rails/commands/encrypted/encrypted_command.rb +46 -35
- data/lib/rails/commands/gem_help/USAGE +16 -0
- data/lib/rails/commands/gem_help/gem_help_command.rb +13 -0
- data/lib/rails/commands/generate/generate_command.rb +2 -2
- data/lib/rails/commands/help/USAGE +13 -13
- data/lib/rails/commands/help/help_command.rb +21 -2
- data/lib/rails/commands/initializers/initializers_command.rb +1 -4
- data/lib/rails/commands/middleware/middleware_command.rb +17 -0
- data/lib/rails/commands/new/new_command.rb +2 -0
- data/lib/rails/commands/notes/notes_command.rb +2 -1
- data/lib/rails/commands/plugin/plugin_command.rb +2 -0
- data/lib/rails/commands/rake/rake_command.rb +25 -22
- data/lib/rails/commands/restart/restart_command.rb +14 -0
- data/lib/rails/commands/routes/routes_command.rb +13 -1
- data/lib/rails/commands/runner/USAGE +14 -12
- data/lib/rails/commands/runner/runner_command.rb +42 -19
- data/lib/rails/commands/secret/secret_command.rb +13 -0
- data/lib/rails/commands/server/server_command.rb +37 -34
- data/lib/rails/commands/test/USAGE +14 -0
- data/lib/rails/commands/test/test_command.rb +58 -14
- data/lib/rails/commands/unused_routes/unused_routes_command.rb +75 -0
- data/lib/rails/commands/version/version_command.rb +1 -0
- data/lib/rails/configuration.rb +15 -6
- data/lib/rails/console/app.rb +5 -35
- data/lib/rails/console/helpers.rb +5 -16
- data/lib/rails/console/methods.rb +23 -0
- data/lib/rails/deprecator.rb +7 -0
- data/lib/rails/engine/configuration.rb +50 -6
- data/lib/rails/engine.rb +53 -25
- data/lib/rails/gem_version.rb +4 -4
- data/lib/rails/generators/actions.rb +6 -15
- data/lib/rails/generators/active_model.rb +28 -14
- data/lib/rails/generators/app_base.rb +382 -88
- data/lib/rails/generators/app_name.rb +3 -14
- data/lib/rails/generators/base.rb +21 -9
- data/lib/rails/generators/database.rb +231 -35
- data/lib/rails/generators/erb/mailer/templates/layout.html.erb.tt +1 -1
- data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +2 -0
- data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +2 -0
- data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +2 -0
- data/lib/rails/generators/generated_attribute.rb +38 -1
- data/lib/rails/generators/migration.rb +4 -5
- data/lib/rails/generators/model_helpers.rb +2 -1
- data/lib/rails/generators/rails/app/USAGE +22 -6
- data/lib/rails/generators/rails/app/app_generator.rb +135 -86
- data/lib/rails/generators/rails/app/templates/Dockerfile.tt +110 -0
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +19 -21
- data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +4 -0
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +8 -1
- data/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/app/views/pwa/manifest.json.erb.tt +22 -0
- data/lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js +26 -0
- data/lib/rails/generators/rails/app/templates/bin/brakeman.tt +6 -0
- data/lib/rails/generators/rails/app/templates/bin/rubocop.tt +7 -0
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +15 -2
- data/lib/rails/generators/rails/app/templates/config/application.rb.tt +6 -17
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +11 -6
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +10 -3
- data/lib/rails/generators/rails/app/templates/config/databases/{jdbcmysql.yml.tt → trilogy.yml.tt} +12 -7
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +25 -8
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +40 -28
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +20 -13
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +3 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +4 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +70 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +11 -9
- data/lib/rails/generators/rails/app/templates/config/locales/en.yml +11 -13
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +25 -34
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +11 -1
- data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +6 -4
- data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +15 -0
- data/lib/rails/generators/rails/app/templates/dockerignore.tt +56 -0
- data/lib/rails/generators/rails/app/templates/github/ci.yml.tt +138 -0
- data/lib/rails/generators/rails/app/templates/github/dependabot.yml +12 -0
- data/lib/rails/generators/rails/app/templates/gitignore.tt +7 -11
- data/lib/rails/generators/rails/app/templates/node-version.tt +1 -0
- data/lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html +66 -0
- data/lib/rails/generators/rails/app/templates/public/icon.png +0 -0
- data/lib/rails/generators/rails/app/templates/public/icon.svg +3 -0
- data/lib/rails/generators/rails/app/templates/rubocop.yml.tt +8 -0
- data/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +10 -8
- data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +9 -7
- data/lib/rails/generators/rails/application_record/application_record_generator.rb +4 -0
- data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +2 -1
- data/lib/rails/generators/rails/controller/USAGE +12 -4
- data/lib/rails/generators/rails/controller/controller_generator.rb +6 -1
- data/lib/rails/generators/rails/controller/templates/controller.rb.tt +1 -1
- data/lib/rails/generators/rails/credentials/credentials_generator.rb +29 -24
- data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +8 -0
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +146 -5
- data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +166 -0
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/Dockerfile.tt +3 -0
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/compose.yaml.tt +47 -0
- data/lib/rails/generators/rails/devcontainer/templates/devcontainer/devcontainer.json.tt +37 -0
- data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +1 -2
- data/lib/rails/generators/rails/migration/USAGE +21 -11
- data/lib/rails/generators/rails/migration/migration_generator.rb +4 -0
- data/lib/rails/generators/rails/model/model_generator.rb +4 -0
- data/lib/rails/generators/rails/plugin/USAGE +17 -6
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +45 -22
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +7 -3
- data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +2 -0
- data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +1 -17
- data/lib/rails/generators/rails/plugin/templates/bin/rubocop.tt +7 -0
- data/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +103 -0
- data/lib/rails/generators/rails/plugin/templates/github/dependabot.yml +12 -0
- data/lib/rails/generators/rails/plugin/templates/gitignore.tt +0 -2
- data/lib/rails/generators/rails/plugin/templates/rubocop.yml.tt +8 -0
- data/lib/rails/generators/rails/plugin/templates/test/application_system_test_case.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +5 -5
- data/lib/rails/generators/rails/resource/resource_generator.rb +6 -0
- data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -1
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -1
- data/lib/rails/generators/test_case.rb +2 -2
- data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb.tt +6 -4
- data/lib/rails/generators/test_unit/mailer/templates/preview.rb.tt +3 -2
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +16 -2
- data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +2 -2
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +2 -2
- data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +2 -0
- data/lib/rails/generators/test_unit/system/templates/application_system_test_case.rb.tt +1 -1
- data/lib/rails/generators/testing/assertions.rb +20 -0
- data/lib/rails/generators/testing/{behaviour.rb → behavior.rb} +8 -4
- data/lib/rails/generators.rb +12 -16
- data/lib/rails/health_controller.rb +55 -0
- data/lib/rails/info.rb +3 -3
- data/lib/rails/info_controller.rb +33 -11
- data/lib/rails/mailers_controller.rb +29 -6
- data/lib/rails/paths.rb +15 -12
- data/lib/rails/pwa_controller.rb +15 -0
- data/lib/rails/rack/logger.rb +27 -16
- data/lib/rails/rackup/server.rb +15 -0
- data/lib/rails/railtie/configurable.rb +2 -2
- data/lib/rails/railtie/configuration.rb +14 -1
- data/lib/rails/railtie.rb +33 -34
- data/lib/rails/source_annotation_extractor.rb +67 -18
- data/lib/rails/tasks/engine.rake +8 -8
- data/lib/rails/tasks/framework.rake +2 -34
- data/lib/rails/tasks/log.rake +1 -1
- data/lib/rails/tasks/misc.rake +3 -14
- data/lib/rails/tasks/statistics.rake +5 -4
- data/lib/rails/tasks/tmp.rake +6 -6
- data/lib/rails/tasks/zeitwerk.rake +15 -35
- data/lib/rails/tasks.rb +0 -2
- data/lib/rails/templates/layouts/application.html.erb +1 -1
- data/lib/rails/templates/rails/mailers/email.html.erb +44 -8
- data/lib/rails/templates/rails/mailers/index.html.erb +14 -7
- data/lib/rails/templates/rails/mailers/mailer.html.erb +11 -5
- data/lib/rails/templates/rails/welcome/index.html.erb +5 -2
- data/lib/rails/test_help.rb +11 -18
- data/lib/rails/test_unit/line_filtering.rb +1 -1
- data/lib/rails/test_unit/reporter.rb +14 -4
- data/lib/rails/test_unit/runner.rb +62 -20
- data/lib/rails/test_unit/test_parser.rb +133 -0
- data/lib/rails/test_unit/testing.rake +13 -33
- data/lib/rails/testing/maintain_test_schema.rb +16 -0
- data/lib/rails/version.rb +1 -1
- data/lib/rails/zeitwerk_checker.rb +15 -0
- data/lib/rails.rb +20 -17
- metadata +87 -40
- data/RDOC_MAIN.rdoc +0 -97
- data/lib/rails/app_updater.rb +0 -40
- data/lib/rails/application/dummy_erb_compiler.rb +0 -18
- data/lib/rails/commands/secrets/USAGE +0 -66
- data/lib/rails/commands/secrets/secrets_command.rb +0 -65
- data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +0 -68
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +0 -70
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +0 -24
- data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +0 -62
- data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +0 -53
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt +0 -143
- data/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png +0 -0
- data/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png +0 -0
- data/lib/rails/generators/rails/app/templates/public/favicon.ico +0 -0
- data/lib/rails/generators/rails/model/USAGE +0 -113
- data/lib/rails/ruby_version_check.rb +0 -15
- data/lib/rails/secrets.rb +0 -110
- data/lib/rails/tasks/middleware.rake +0 -9
- data/lib/rails/tasks/restart.rake +0 -9
data/CHANGELOG.md
CHANGED
@@ -1,443 +1,381 @@
|
|
1
|
-
## Rails 7.
|
1
|
+
## Rails 7.2.2.1 (December 10, 2024) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails 7.
|
6
|
+
## Rails 7.2.2 (October 30, 2024) ##
|
7
7
|
|
8
8
|
* No changes.
|
9
9
|
|
10
10
|
|
11
|
-
## Rails 7.
|
11
|
+
## Rails 7.2.1.2 (October 23, 2024) ##
|
12
12
|
|
13
13
|
* No changes.
|
14
14
|
|
15
15
|
|
16
|
-
## Rails 7.
|
16
|
+
## Rails 7.2.1.1 (October 15, 2024) ##
|
17
17
|
|
18
18
|
* No changes.
|
19
19
|
|
20
20
|
|
21
|
-
## Rails 7.
|
21
|
+
## Rails 7.2.1 (August 22, 2024) ##
|
22
22
|
|
23
|
-
*
|
23
|
+
* Fix `rails console` for application with non default application constant.
|
24
24
|
|
25
|
+
The wrongly assumed the Rails application would be named `AppNamespace::Application`,
|
26
|
+
which is the default but not an obligation.
|
25
27
|
|
26
|
-
|
28
|
+
*Jean Boussier*
|
27
29
|
|
28
|
-
*
|
30
|
+
* Fix the default Dockerfile to include the full sqlite3 package.
|
29
31
|
|
32
|
+
Prior to this it only included `libsqlite3`, so it wasn't enough to
|
33
|
+
run `rails dbconsole`.
|
30
34
|
|
31
|
-
|
35
|
+
*Jerome Dalbert*
|
32
36
|
|
33
|
-
*
|
37
|
+
* Don't update public directory during `app:update` command for API-only Applications.
|
34
38
|
|
39
|
+
*y-yagi*
|
35
40
|
|
36
|
-
|
41
|
+
* Don't add bin/brakeman if brakeman is not in bundle when upgrading an application.
|
37
42
|
|
38
|
-
*
|
43
|
+
*Etienne Barrié*
|
39
44
|
|
40
|
-
|
41
|
-
|
42
|
-
## Rails 7.0.7.2 (August 22, 2023) ##
|
45
|
+
* Remove PWA views and routes if its an API only project.
|
43
46
|
|
44
|
-
*
|
47
|
+
*Jean Boussier*
|
45
48
|
|
49
|
+
* Simplify generated Puma configuration
|
46
50
|
|
47
|
-
|
51
|
+
*DHH*, *Rafael Mendonça França*
|
48
52
|
|
49
|
-
* No changes.
|
50
53
|
|
54
|
+
## Rails 7.2.0 (August 09, 2024) ##
|
51
55
|
|
52
|
-
|
56
|
+
* The new `bin/rails boot` command boots the application and exits. Supports the
|
57
|
+
standard `-e/--environment` options.
|
53
58
|
|
54
|
-
*
|
55
|
-
on redirect for the update action for XHR requests other than GET or POST
|
56
|
-
to avoid issues (e.g browsers trying to follow the redirect using the
|
57
|
-
original request method resulting in double PATCH/PUT)
|
59
|
+
*Xavier Noria*
|
58
60
|
|
59
|
-
|
61
|
+
* Create a Dev Container Generator that generates a Dev Container setup based on the current configuration
|
62
|
+
of the application. Usage:
|
60
63
|
|
64
|
+
`bin/rails devcontainer`
|
61
65
|
|
62
|
-
|
63
|
-
* Avoid escaping paths when editing credentials.
|
66
|
+
*Andrew Novoselac*
|
64
67
|
|
65
|
-
|
68
|
+
* Add Rubocop and GitHub Actions to plugin generator.
|
69
|
+
This can be skipped using --skip-rubocop and --skip-ci.
|
66
70
|
|
71
|
+
*Chris Oliver*
|
67
72
|
|
68
|
-
|
73
|
+
* Remove support for `oracle`, `sqlserver` and JRuby specific database adapters from the
|
74
|
+
`rails new` and `rails db:system:change` commands.
|
69
75
|
|
70
|
-
|
76
|
+
The supported options are `sqlite3`, `mysql`, `postgresql` and `trilogy`.
|
71
77
|
|
78
|
+
*Andrew Novoselac*
|
72
79
|
|
73
|
-
|
80
|
+
* Add options to `bin/rails app:update`.
|
74
81
|
|
75
|
-
|
82
|
+
`bin/rails app:update` now supports the same generic options that generators do:
|
76
83
|
|
77
|
-
*
|
84
|
+
* `--force`: Accept all changes to existing files
|
85
|
+
* `--skip`: Refuse all changes to existing files
|
86
|
+
* `--pretend`: Don't make any changes
|
87
|
+
* `--quiet`: Don't output all changes made
|
78
88
|
|
79
|
-
|
89
|
+
*Étienne Barrié*
|
80
90
|
|
81
|
-
|
91
|
+
* Implement Rails console commands and helpers with IRB v1.13's extension APIs.
|
82
92
|
|
83
|
-
|
93
|
+
Rails console users will now see `helper`, `controller`, `new_session`, and `app` under
|
94
|
+
IRB help message's `Helper methods` category. And `reload!` command will be displayed under
|
95
|
+
the new `Rails console` commands category.
|
84
96
|
|
85
|
-
|
86
|
-
|
97
|
+
Prior to this change, Rails console's commands and helper methods are added through IRB's
|
98
|
+
private components and don't show up in its help message, which led to poor discoverability.
|
87
99
|
|
88
|
-
*
|
100
|
+
*Stan Lo*
|
89
101
|
|
102
|
+
* Remove deprecated `Rails::Generators::Testing::Behaviour`.
|
90
103
|
|
91
|
-
|
104
|
+
*Rafael Mendonça França*
|
92
105
|
|
93
|
-
*
|
106
|
+
* Remove deprecated `find_cmd_and_exec` console helper.
|
94
107
|
|
108
|
+
*Rafael Mendonça França*
|
95
109
|
|
96
|
-
|
110
|
+
* Remove deprecated `Rails.config.enable_dependency_loading`.
|
97
111
|
|
98
|
-
*
|
112
|
+
*Rafael Mendonça França*
|
99
113
|
|
114
|
+
* Remove deprecated `Rails.application.secrets`.
|
100
115
|
|
101
|
-
|
116
|
+
*Rafael Mendonça França*
|
102
117
|
|
103
|
-
*
|
118
|
+
* Generated Gemfile will include `require: "debug/prelude"` for the `debug` gem.
|
104
119
|
|
120
|
+
Requiring `debug` gem directly automatically activates it, which could introduce
|
121
|
+
additional overhead and memory usage even without entering a debugging session.
|
105
122
|
|
106
|
-
|
123
|
+
By making Bundler require `debug/prelude` instead, developers can keep their access
|
124
|
+
to breakpoint methods like `debugger` or `binding.break`, but the debugger won't be
|
125
|
+
activated until a breakpoint is hit.
|
107
126
|
|
108
|
-
*
|
127
|
+
*Stan Lo*
|
109
128
|
|
110
|
-
|
111
|
-
|
129
|
+
* Skip generating a `test` job in ci.yml when a new application is generated with the
|
130
|
+
`--skip-test` option.
|
112
131
|
|
113
|
-
*
|
132
|
+
*Steve Polito*
|
114
133
|
|
115
|
-
*
|
134
|
+
* Update the `.node-version` file conditionally generated for new applications to 20.11.1
|
116
135
|
|
117
|
-
|
136
|
+
*Steve Polito*
|
118
137
|
|
119
|
-
*
|
138
|
+
* Fix sanitizer vendor configuration in 7.1 defaults.
|
120
139
|
|
121
|
-
|
140
|
+
In apps where rails-html-sanitizer was not eagerly loaded, the sanitizer default could end up
|
141
|
+
being Rails::HTML4::Sanitizer when it should be set to Rails::HTML5::Sanitizer.
|
122
142
|
|
123
|
-
*
|
143
|
+
*Mike Dalessio*, *Rafael Mendonça França*
|
124
144
|
|
125
|
-
|
126
|
-
wasn't working properly. Note that even after this fix, it can only be applied from
|
127
|
-
the `application.rb` file.
|
145
|
+
* Set `action_mailer.default_url_options` values in `development` and `test`.
|
128
146
|
|
129
|
-
|
147
|
+
Prior to this commit, new Rails applications would raise `ActionView::Template::Error`
|
148
|
+
if a mailer included a url built with a `*_path` helper.
|
130
149
|
|
150
|
+
*Steve Polito*
|
131
151
|
|
132
|
-
|
152
|
+
* Introduce `Rails::Generators::Testing::Assertions#assert_initializer`.
|
133
153
|
|
134
|
-
|
154
|
+
Compliments the existing `initializer` generator action.
|
135
155
|
|
156
|
+
```rb
|
157
|
+
assert_initializer "mail_interceptors.rb"
|
158
|
+
```
|
136
159
|
|
137
|
-
|
160
|
+
*Steve Polito*
|
138
161
|
|
139
|
-
*
|
162
|
+
* Generate a .devcontainer folder and its contents when creating a new app.
|
140
163
|
|
141
|
-
|
164
|
+
The .devcontainer folder includes everything needed to boot the app and do development in a remote container.
|
142
165
|
|
143
|
-
|
166
|
+
The container setup includes:
|
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
|
144
171
|
|
145
|
-
|
146
|
-
a namespaced controller with a top-level model using `--model-name`.
|
172
|
+
If any of these options are skipped in the app setup they will not be included in the container configuration.
|
147
173
|
|
148
|
-
|
174
|
+
These files can be skipped using the `--skip-devcontainer` option.
|
149
175
|
|
150
|
-
|
151
|
-
bin/rails generate scaffold_controller Admin/Post --model-name Post
|
152
|
-
```
|
176
|
+
*Andrew Novoselac & Rafael Mendonça França*
|
153
177
|
|
154
|
-
|
178
|
+
* Introduce `SystemTestCase#served_by` for configuring the System Test application server.
|
155
179
|
|
156
|
-
|
157
|
-
# GET /posts
|
158
|
-
def index
|
159
|
-
@posts = Post.all
|
160
|
-
end
|
161
|
-
```
|
162
|
-
|
163
|
-
afterwards, they now look like this:
|
180
|
+
By default this is localhost. This method allows the host and port to be specified manually.
|
164
181
|
|
165
|
-
```
|
166
|
-
|
167
|
-
|
168
|
-
@posts = Post.all
|
182
|
+
```ruby
|
183
|
+
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
184
|
+
served_by host: "testserver", port: 45678
|
169
185
|
end
|
170
186
|
```
|
171
187
|
|
172
|
-
|
173
|
-
|
174
|
-
*Andrew White*
|
175
|
-
|
176
|
-
## Rails 7.0.2.4 (April 26, 2022) ##
|
177
|
-
|
178
|
-
* No changes.
|
179
|
-
|
180
|
-
|
181
|
-
## Rails 7.0.2.3 (March 08, 2022) ##
|
182
|
-
|
183
|
-
* No changes.
|
184
|
-
|
185
|
-
|
186
|
-
## Rails 7.0.2.2 (February 11, 2022) ##
|
187
|
-
|
188
|
-
* No changes.
|
189
|
-
|
190
|
-
|
191
|
-
## Rails 7.0.2.1 (February 11, 2022) ##
|
192
|
-
|
193
|
-
* No changes.
|
194
|
-
|
195
|
-
|
196
|
-
## Rails 7.0.2 (February 08, 2022) ##
|
197
|
-
|
198
|
-
* No changes.
|
199
|
-
|
200
|
-
|
201
|
-
## Rails 7.0.1 (January 06, 2022) ##
|
202
|
-
|
203
|
-
* Prevent duplicate entries in plugin Gemfile.
|
204
|
-
|
205
|
-
*Jonathan Hefner*
|
206
|
-
|
207
|
-
* Fix asset pipeline errors for plugin dummy apps.
|
208
|
-
|
209
|
-
*Jonathan Hefner*
|
188
|
+
*Andrew Novoselac & Rafael Mendonça França*
|
210
189
|
|
211
|
-
*
|
190
|
+
* `bin/rails test` will no longer load files named `*_test.rb` if they are located in the `fixtures` folder.
|
212
191
|
|
213
|
-
*
|
192
|
+
*Edouard Chin*
|
214
193
|
|
215
|
-
*
|
216
|
-
namespaces.
|
217
|
-
|
218
|
-
See [fxn/zeitwerk#198](https://github.com/fxn/zeitwerk/issues/198) for
|
219
|
-
details.
|
220
|
-
|
221
|
-
*Xavier Noria*
|
222
|
-
|
223
|
-
* Fix plugin generator to a plugin that pass all the tests.
|
224
|
-
|
225
|
-
*Rafael Mendonça França*
|
194
|
+
* Ensure logger tags configured with `config.log_tags` are still active in `request.action_dispatch` handlers.
|
226
195
|
|
196
|
+
*KJ Tsanaktsidis*
|
227
197
|
|
228
|
-
|
198
|
+
* Setup jemalloc in the default Dockerfile for memory optimization.
|
229
199
|
|
230
|
-
*
|
200
|
+
*Matt Almeida*, *Jean Boussier*
|
231
201
|
|
202
|
+
* Commented out lines in .railsrc file should not be treated as arguments when using
|
203
|
+
rails new generator command. Update ARGVScrubber to ignore text after `#` symbols.
|
232
204
|
|
233
|
-
|
205
|
+
*Willian Tenfen*
|
234
206
|
|
235
|
-
*
|
207
|
+
* Skip CSS when generating APIs.
|
236
208
|
|
237
|
-
|
209
|
+
*Ruy Rocha*
|
238
210
|
|
239
|
-
|
211
|
+
* Rails console now indicates application name and the current Rails environment:
|
240
212
|
|
241
|
-
|
213
|
+
```txt
|
214
|
+
my-app(dev)> # for RAILS_ENV=development
|
215
|
+
my-app(test)> # for RAILS_ENV=test
|
216
|
+
my-app(prod)> # for RAILS_ENV=production
|
217
|
+
my-app(my_env)> # for RAILS_ENV=my_env
|
218
|
+
```
|
242
219
|
|
243
|
-
|
220
|
+
The application name is derived from the application's module name from `config/application.rb`.
|
221
|
+
For example, `MyApp` will displayed as `my-app` in the prompt.
|
244
222
|
|
245
|
-
|
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.
|
246
226
|
|
247
|
-
*
|
227
|
+
*Stan Lo*
|
248
228
|
|
249
|
-
*
|
229
|
+
* Ensure `autoload_paths`, `autoload_once_paths`, `eager_load_paths`, and
|
230
|
+
`load_paths` only have directories when initialized from engine defaults.
|
250
231
|
|
251
|
-
|
252
|
-
has been removed from all major modern browsers (in favour of
|
253
|
-
Content Security Policy) that implemented this header to begin with
|
254
|
-
(Firefox never did).
|
232
|
+
Previously, files under the `app` directory could end up there too.
|
255
233
|
|
256
|
-
|
257
|
-
suggests setting this header to '0' to disable the default behaviour
|
258
|
-
on old browsers as it can introduce additional security issues.
|
234
|
+
*Takumasa Ochi*
|
259
235
|
|
260
|
-
|
236
|
+
* Prevent unnecessary application reloads in development.
|
261
237
|
|
262
|
-
|
238
|
+
Previously, some files outside autoload paths triggered unnecessary reloads.
|
239
|
+
With this fix, application reloads according to `Rails.autoloaders.main.dirs`,
|
240
|
+
thereby preventing unnecessary reloads.
|
263
241
|
|
264
|
-
*
|
265
|
-
date_select, time_select and datetime_select; thus providing native date/time pickers.
|
242
|
+
*Takumasa Ochi*
|
266
243
|
|
267
|
-
|
244
|
+
* Use `oven-sh/setup-bun` in GitHub CI when generating an app with Bun.
|
268
245
|
|
269
|
-
*
|
246
|
+
*TangRufus*
|
270
247
|
|
271
|
-
|
248
|
+
* Disable `pidfile` generation in the `production` environment.
|
272
249
|
|
273
|
-
|
250
|
+
*Hans Schnedlitz*
|
274
251
|
|
275
|
-
*
|
252
|
+
* Set `config.action_view.annotate_rendered_view_with_filenames` to `true` in
|
253
|
+
the `development` environment.
|
276
254
|
|
277
|
-
*
|
255
|
+
*Adrian Marin*
|
278
256
|
|
279
|
-
|
257
|
+
* Support the `BACKTRACE` environment variable to turn off backtrace cleaning.
|
280
258
|
|
281
|
-
|
282
|
-
or `config/initializers/cookies_serializer.rb`
|
259
|
+
Useful for debugging framework code:
|
283
260
|
|
284
|
-
|
285
|
-
|
261
|
+
```sh
|
262
|
+
BACKTRACE=1 bin/rails server
|
263
|
+
```
|
286
264
|
|
287
265
|
*Alex Ghiculescu*
|
288
266
|
|
289
|
-
*
|
290
|
-
|
291
|
-
*Xavier Noria*
|
292
|
-
|
293
|
-
* Add SSL support for postgresql in `bin/rails dbconsole`.
|
294
|
-
|
295
|
-
Fixes #43114.
|
296
|
-
|
297
|
-
*Michael Bayucot*
|
298
|
-
|
299
|
-
* Add support for comments above gem declaration in Rails application templates, e.g. `gem("nokogiri", comment: "For XML")`.
|
267
|
+
* Raise `ArgumentError` when reading `config.x.something` with arguments:
|
300
268
|
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
available autoloading mode.
|
305
|
-
|
306
|
-
*Xavier Noria*
|
307
|
-
|
308
|
-
* `config.autoload_once_paths` can be configured in the body of the
|
309
|
-
application class defined in `config/application.rb` or in the configuration
|
310
|
-
for environments in `config/environments/*`.
|
311
|
-
|
312
|
-
Similarly, engines can configure that collection in the class body of the
|
313
|
-
engine class or in the configuration for environments.
|
314
|
-
|
315
|
-
After that, the collection is frozen, and you can autoload from those paths.
|
316
|
-
They are managed by the `Rails.autoloaders.once` autoloader, which does not
|
317
|
-
reload, only autoloads/eager loads.
|
318
|
-
|
319
|
-
*Xavier Noria*
|
320
|
-
|
321
|
-
* During initialization, you cannot autoload reloadable classes or modules
|
322
|
-
like application models, unless they are wrapped in a `to_prepare` block.
|
323
|
-
For example, from `config/initializers/*`, or in application, engines, or
|
324
|
-
railties initializers.
|
325
|
-
|
326
|
-
Please check the [autoloading
|
327
|
-
guide](https://guides.rubyonrails.org/v7.0/autoloading_and_reloading_constants.html#autoloading-when-the-application-boots)
|
328
|
-
for details.
|
329
|
-
|
330
|
-
*Xavier Noria*
|
331
|
-
|
332
|
-
* While they are allowed to have elements in common, it is no longer required
|
333
|
-
that `config.autoload_once_paths` is a subset of `config.autoload_paths`.
|
334
|
-
The former are managed by the `once` autoloader. The `main` autoloader
|
335
|
-
manages the latter minus the former.
|
336
|
-
|
337
|
-
*Xavier Noria*
|
269
|
+
```ruby
|
270
|
+
config.x.this_works.this_raises true # raises ArgumentError
|
271
|
+
```
|
338
272
|
|
339
|
-
*
|
273
|
+
*Sean Doyle*
|
340
274
|
|
341
|
-
|
342
|
-
the task description instead of the general Rake help.
|
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.
|
343
276
|
|
344
|
-
*
|
277
|
+
*DHH*
|
345
278
|
|
346
|
-
*
|
279
|
+
* Updated system tests to now use headless Chrome by default for the new applications.
|
347
280
|
|
348
|
-
*
|
281
|
+
*DHH*
|
349
282
|
|
350
|
-
*
|
283
|
+
* Add GitHub CI files for Dependabot, Brakeman, RuboCop, and running tests by default. Can be skipped with `--skip-ci`.
|
351
284
|
|
352
|
-
*
|
285
|
+
*DHH*
|
353
286
|
|
354
|
-
*
|
287
|
+
* Add Brakeman by default for static analysis of security vulnerabilities. Allow skipping with `--skip-brakeman option`.
|
355
288
|
|
356
|
-
*
|
289
|
+
*vipulnsward*
|
357
290
|
|
358
|
-
*
|
291
|
+
* Add RuboCop with rules from `rubocop-rails-omakase` by default. Skip with `--skip-rubocop`.
|
359
292
|
|
360
|
-
*
|
293
|
+
*DHH* and *zzak*
|
361
294
|
|
362
|
-
*
|
363
|
-
|
364
|
-
a Author", "updating a Author", and "destroying a Author".
|
295
|
+
* Use `bin/rails runner --skip-executor` to not wrap the runner script with an
|
296
|
+
Executor.
|
365
297
|
|
366
|
-
|
298
|
+
*Ben Sheldon*
|
367
299
|
|
368
|
-
|
300
|
+
* Fix isolated engines to take `ActiveRecord::Base.table_name_prefix` into consideration.
|
369
301
|
|
370
|
-
|
302
|
+
This will allow for engine defined models, such as inside Active Storage, to respect
|
303
|
+
Active Record table name prefix configuration.
|
371
304
|
|
372
|
-
*
|
305
|
+
*Chedli Bourguiba*
|
373
306
|
|
374
|
-
* `
|
307
|
+
* Fix running `db:system:change` when the app has no Dockerfile.
|
375
308
|
|
376
|
-
*
|
309
|
+
*Hartley McGuire*
|
377
310
|
|
378
|
-
*
|
311
|
+
* In Action Mailer previews, list inline attachments separately from normal
|
312
|
+
attachments.
|
379
313
|
|
380
|
-
|
381
|
-
`Rails.application.config_for` now uses `YAML.unsafe_load` if available.
|
314
|
+
For example, attachments that were previously listed like
|
382
315
|
|
383
|
-
|
316
|
+
> Attachments: logo.png file1.pdf file2.pdf
|
384
317
|
|
385
|
-
|
318
|
+
will now be listed like
|
386
319
|
|
387
|
-
|
320
|
+
> Attachments: file1.pdf file2.pdf (Inline: logo.png)
|
388
321
|
|
389
|
-
*
|
322
|
+
*Christian Schmidt* and *Jonathan Hefner*
|
390
323
|
|
391
|
-
|
324
|
+
* In mailer preview, only show SMTP-To if it differs from the union of To, Cc and Bcc.
|
392
325
|
|
393
|
-
*
|
394
|
-
referencing it in middleware operations without adding it back.
|
326
|
+
*Christian Schmidt*
|
395
327
|
|
396
|
-
|
328
|
+
* Enable YJIT by default on new applications running Ruby 3.3+.
|
397
329
|
|
398
|
-
|
330
|
+
This can be disabled by setting `Rails.application.config.yjit = false`
|
399
331
|
|
400
|
-
*
|
332
|
+
*Jean Boussier*, *Rafael Mendonça França*
|
401
333
|
|
402
|
-
*
|
334
|
+
* In Action Mailer previews, show date from message `Date` header if present.
|
403
335
|
|
404
|
-
*
|
336
|
+
*Sampat Badhe*
|
405
337
|
|
406
|
-
*
|
338
|
+
* Exit with non-zero status when the migration generator fails.
|
407
339
|
|
408
|
-
*
|
340
|
+
*Katsuhiko YOSHIDA*
|
409
341
|
|
410
|
-
*
|
411
|
-
course of developing a Rails app. See [#41083](https://github.com/rails/rails/pull/41083) for
|
412
|
-
the full list of changes.
|
342
|
+
* Use numeric UID and GID in Dockerfile template.
|
413
343
|
|
414
|
-
|
344
|
+
The Dockerfile generated by `rails new` sets the default user and group
|
345
|
+
by name instead of UID:GID. This can cause the following error in Kubernetes:
|
415
346
|
|
416
|
-
|
347
|
+
```
|
348
|
+
container has runAsNonRoot and image has non-numeric user (rails), cannot verify user is non-root
|
349
|
+
```
|
417
350
|
|
418
|
-
|
351
|
+
This change sets default user and group by their numeric values.
|
419
352
|
|
420
|
-
*
|
353
|
+
*Ivan Fedotov*
|
421
354
|
|
422
|
-
|
423
|
-
Rails.benchmark("test_expensive_stuff") { ... }
|
424
|
-
end
|
355
|
+
* Disallow invalid values for rails new options.
|
425
356
|
|
426
|
-
|
357
|
+
The `--database`, `--asset-pipeline`, `--css`, and `--javascript` options
|
358
|
+
for `rails new` take different arguments. This change validates them.
|
427
359
|
|
428
|
-
*
|
360
|
+
*Tony Drake*, *Akhil G Krishnan*, *Petrik de Heus*
|
429
361
|
|
430
|
-
*
|
362
|
+
* Conditionally print `$stdout` when invoking `run_generator`.
|
431
363
|
|
432
|
-
|
364
|
+
In an effort to improve the developer experience when debugging
|
365
|
+
generator tests, we add the ability to conditionally print `$stdout`
|
366
|
+
instead of capturing it.
|
433
367
|
|
434
|
-
|
368
|
+
This allows for calls to `binding.irb` and `puts` work as expected.
|
435
369
|
|
436
|
-
|
370
|
+
```sh
|
371
|
+
RAILS_LOG_TO_STDOUT=true ./bin/test test/generators/actions_test.rb
|
372
|
+
```
|
437
373
|
|
438
|
-
*
|
374
|
+
*Steve Polito*
|
439
375
|
|
440
|
-
|
376
|
+
* Remove the option `config.public_file_server.enabled` from the generators
|
377
|
+
for all environments, as the value is the same in all environments.
|
441
378
|
|
379
|
+
*Adrian Hirt*
|
442
380
|
|
443
|
-
Please check [
|
381
|
+
Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/railties/CHANGELOG.md) for previous changes.
|