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