railties 6.0.6.1 → 6.1.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +281 -367
- data/MIT-LICENSE +1 -1
- data/RDOC_MAIN.rdoc +1 -1
- data/lib/minitest/rails_plugin.rb +16 -1
- data/lib/rails/application/bootstrap.rb +5 -5
- data/lib/rails/application/configuration.rb +77 -24
- data/lib/rails/application/default_middleware_stack.rb +5 -3
- data/lib/rails/application/finisher.rb +15 -2
- data/lib/rails/application/routes_reloader.rb +9 -2
- data/lib/rails/application.rb +53 -80
- data/lib/rails/backtrace_cleaner.rb +12 -7
- data/lib/rails/code_statistics.rb +3 -3
- data/lib/rails/code_statistics_calculator.rb +6 -6
- data/lib/rails/command/base.rb +1 -1
- data/lib/rails/command/behavior.rb +1 -1
- data/lib/rails/command/environment_argument.rb +1 -1
- data/lib/rails/command.rb +5 -1
- data/lib/rails/commands/credentials/USAGE +17 -2
- data/lib/rails/commands/credentials/credentials_command/diffing.rb +41 -0
- data/lib/rails/commands/credentials/credentials_command.rb +30 -5
- data/lib/rails/commands/db/system/change/change_command.rb +6 -1
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +65 -59
- data/lib/rails/commands/encrypted/encrypted_command.rb +4 -4
- data/lib/rails/commands/generate/generate_command.rb +1 -1
- data/lib/rails/commands/notes/notes_command.rb +1 -11
- data/lib/rails/commands/rake/rake_command.rb +9 -8
- data/lib/rails/commands/secrets/USAGE +9 -3
- data/lib/rails/commands/server/server_command.rb +14 -41
- data/lib/rails/commands/test/test_command.rb +2 -2
- data/lib/rails/configuration.rb +40 -10
- data/lib/rails/engine/configuration.rb +1 -0
- data/lib/rails/engine/updater.rb +1 -1
- data/lib/rails/engine.rb +35 -32
- data/lib/rails/gem_version.rb +3 -3
- data/lib/rails/generators/actions/create_migration.rb +7 -0
- data/lib/rails/generators/actions.rb +50 -29
- data/lib/rails/generators/app_base.rb +48 -23
- data/lib/rails/generators/base.rb +14 -11
- data/lib/rails/generators/database.rb +3 -4
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +3 -3
- data/lib/rails/generators/generated_attribute.rb +3 -9
- data/lib/rails/generators/migration.rb +2 -1
- data/lib/rails/generators/model_helpers.rb +26 -2
- data/lib/rails/generators/named_base.rb +1 -1
- data/lib/rails/generators/rails/app/USAGE +2 -1
- data/lib/rails/generators/rails/app/app_generator.rb +87 -15
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +12 -12
- data/lib/rails/generators/rails/app/templates/Rakefile.tt +1 -1
- data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +1 -1
- data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +11 -11
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +2 -1
- data/lib/rails/generators/rails/app/templates/bin/rails.tt +5 -2
- data/lib/rails/generators/rails/app/templates/bin/rake.tt +5 -2
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +4 -4
- data/lib/rails/generators/rails/app/templates/bin/spring.tt +13 -0
- data/lib/rails/generators/rails/app/templates/bin/yarn.tt +9 -3
- data/lib/rails/generators/rails/app/templates/config/application.rb.tt +14 -7
- data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +3 -4
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +10 -9
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +11 -10
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +10 -9
- data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +11 -10
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +11 -10
- data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +10 -9
- data/lib/rails/generators/rails/app/templates/config/environment.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +17 -3
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +15 -5
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +12 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +4 -3
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +67 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +11 -0
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +6 -1
- data/lib/rails/generators/rails/app/templates/config.ru.tt +2 -1
- data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/gitattributes.tt +14 -0
- data/lib/rails/generators/rails/app/templates/gitignore.tt +0 -1
- data/lib/rails/generators/rails/app/templates/package.json.tt +1 -1
- data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +5 -5
- data/lib/rails/generators/rails/assets/USAGE +2 -3
- data/lib/rails/generators/rails/benchmark/USAGE +19 -0
- data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +29 -0
- data/lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt +15 -0
- data/lib/rails/generators/rails/controller/USAGE +2 -2
- data/lib/rails/generators/rails/controller/controller_generator.rb +2 -40
- data/lib/rails/generators/rails/credentials/credentials_generator.rb +1 -1
- data/lib/rails/generators/rails/generator/USAGE +2 -2
- data/lib/rails/generators/rails/generator/templates/USAGE.tt +1 -1
- data/lib/rails/generators/rails/helper/USAGE +2 -3
- data/lib/rails/generators/rails/integration_test/USAGE +2 -2
- data/lib/rails/generators/rails/migration/USAGE +4 -4
- data/lib/rails/generators/rails/model/USAGE +15 -16
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +25 -23
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +10 -19
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +3 -10
- data/lib/rails/generators/rails/plugin/templates/Rakefile.tt +4 -18
- data/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +0 -1
- data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +3 -3
- data/lib/rails/generators/rails/plugin/templates/gitignore.tt +13 -11
- data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb.tt +1 -0
- data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb.tt +4 -4
- data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +0 -3
- data/lib/rails/generators/rails/resource/USAGE +4 -4
- data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +2 -27
- data/lib/rails/generators/rails/scaffold/USAGE +5 -5
- data/lib/rails/generators/rails/scaffold_controller/USAGE +2 -2
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +6 -0
- data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -1
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +1 -1
- data/lib/rails/generators/rails/system_test/USAGE +2 -2
- data/lib/rails/generators/rails/task/USAGE +3 -3
- data/lib/rails/generators/test_case.rb +1 -1
- data/lib/rails/generators/test_unit/controller/controller_generator.rb +2 -0
- data/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt +3 -3
- data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +2 -2
- data/lib/rails/generators/test_unit/integration/templates/integration_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/job/templates/unit_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +1 -1
- data/lib/rails/generators/test_unit/model/templates/unit_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +2 -2
- data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +1 -1
- data/lib/rails/generators/testing/assertions.rb +2 -2
- data/lib/rails/generators/testing/behaviour.rb +1 -1
- data/lib/rails/generators.rb +29 -15
- data/lib/rails/info.rb +1 -1
- data/lib/rails/info_controller.rb +1 -1
- data/lib/rails/mailers_controller.rb +1 -0
- data/lib/rails/paths.rb +14 -6
- data/lib/rails/railtie/configuration.rb +3 -2
- data/lib/rails/railtie.rb +31 -10
- data/lib/rails/secrets.rb +14 -9
- data/lib/rails/source_annotation_extractor.rb +2 -16
- data/lib/rails/tasks/engine.rake +1 -4
- data/lib/rails/tasks/framework.rake +7 -1
- data/lib/rails/tasks/misc.rake +1 -1
- data/lib/rails/tasks/statistics.rake +1 -1
- data/lib/rails/tasks/yarn.rake +14 -2
- data/lib/rails/tasks.rb +0 -4
- data/lib/rails/templates/rails/mailers/email.html.erb +1 -0
- data/lib/rails/templates/rails/welcome/index.html.erb +1 -1
- data/lib/rails/test_unit/reporter.rb +2 -1
- data/lib/rails/test_unit/runner.rb +12 -3
- data/lib/rails/test_unit/testing.rake +6 -0
- data/lib/rails.rb +5 -8
- metadata +26 -32
- data/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt +0 -50
- data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt +0 -86
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +0 -45
- data/lib/rails/generators/rails/plugin/templates/rails/application.rb.tt +0 -23
- data/lib/rails/tasks/annotations.rake +0 -22
- data/lib/rails/tasks/dev.rake +0 -11
- data/lib/rails/tasks/initializers.rake +0 -9
- data/lib/rails/tasks/routes.rake +0 -9
data/CHANGELOG.md
CHANGED
@@ -1,615 +1,529 @@
|
|
1
|
-
## Rails 6.
|
1
|
+
## Rails 6.1.7.6 (August 22, 2023) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails 6.
|
6
|
+
## Rails 6.1.7.5 (August 22, 2023) ##
|
7
7
|
|
8
8
|
* No changes.
|
9
9
|
|
10
10
|
|
11
|
-
## Rails 6.
|
11
|
+
## Rails 6.1.7.4 (June 26, 2023) ##
|
12
12
|
|
13
13
|
* No changes.
|
14
14
|
|
15
15
|
|
16
|
-
## Rails 6.
|
16
|
+
## Rails 6.1.7.3 (March 13, 2023) ##
|
17
17
|
|
18
18
|
* No changes.
|
19
19
|
|
20
20
|
|
21
|
-
## Rails 6.
|
21
|
+
## Rails 6.1.7.2 (January 24, 2023) ##
|
22
22
|
|
23
23
|
* No changes.
|
24
24
|
|
25
25
|
|
26
|
-
## Rails 6.
|
26
|
+
## Rails 6.1.7.1 (January 17, 2023) ##
|
27
27
|
|
28
28
|
* No changes.
|
29
29
|
|
30
30
|
|
31
|
-
## Rails 6.
|
31
|
+
## Rails 6.1.7 (September 09, 2022) ##
|
32
32
|
|
33
33
|
* No changes.
|
34
34
|
|
35
35
|
|
36
|
-
## Rails 6.
|
36
|
+
## Rails 6.1.6.1 (July 12, 2022) ##
|
37
37
|
|
38
38
|
* No changes.
|
39
39
|
|
40
40
|
|
41
|
-
## Rails 6.
|
41
|
+
## Rails 6.1.6 (May 09, 2022) ##
|
42
42
|
|
43
43
|
* No changes.
|
44
44
|
|
45
45
|
|
46
|
-
## Rails 6.
|
47
|
-
|
48
|
-
* Allow localhost with a port by default in development
|
49
|
-
|
50
|
-
[Fixes: #43864]
|
51
|
-
|
52
|
-
## Rails 6.0.4.2 (December 14, 2021) ##
|
46
|
+
## Rails 6.1.5.1 (April 26, 2022) ##
|
53
47
|
|
54
48
|
* No changes.
|
55
49
|
|
56
50
|
|
57
|
-
## Rails 6.
|
58
|
-
|
59
|
-
* No changes.
|
51
|
+
## Rails 6.1.5 (March 09, 2022) ##
|
60
52
|
|
53
|
+
* In `zeitwerk` mode, setup the `once` autoloader first, and the `main` autoloader after it.
|
54
|
+
This order plays better with shared namespaces.
|
61
55
|
|
62
|
-
|
63
|
-
|
64
|
-
* Allow relative paths with trailing slashes to be passed to `rails test`.
|
56
|
+
*Xavier Noria*
|
65
57
|
|
66
|
-
|
58
|
+
* Handle paths with spaces when editing credentials.
|
67
59
|
|
68
|
-
*
|
60
|
+
*Alex Ghiculescu*
|
69
61
|
|
70
|
-
|
62
|
+
* Support Psych 4 when loading secrets.
|
71
63
|
|
72
|
-
*
|
64
|
+
*Nat Morcos*
|
73
65
|
|
74
66
|
|
75
|
-
## Rails 6.
|
67
|
+
## Rails 6.1.4.7 (March 08, 2022) ##
|
76
68
|
|
77
69
|
* No changes.
|
78
70
|
|
79
71
|
|
80
|
-
## Rails 6.
|
72
|
+
## Rails 6.1.4.6 (February 11, 2022) ##
|
81
73
|
|
82
74
|
* No changes.
|
83
75
|
|
84
76
|
|
85
|
-
## Rails 6.
|
77
|
+
## Rails 6.1.4.5 (February 11, 2022) ##
|
86
78
|
|
87
79
|
* No changes.
|
88
80
|
|
89
81
|
|
90
|
-
|
91
|
-
## Rails 6.0.3.4 (October 07, 2020) ##
|
82
|
+
## Rails 6.1.4.4 (December 15, 2021) ##
|
92
83
|
|
93
84
|
* No changes.
|
94
85
|
|
95
86
|
|
96
|
-
## Rails 6.
|
87
|
+
## Rails 6.1.4.3 (December 14, 2021) ##
|
97
88
|
|
98
|
-
*
|
89
|
+
* Allow localhost with a port by default in development
|
99
90
|
|
91
|
+
[Fixes: #43864]
|
100
92
|
|
101
|
-
## Rails 6.
|
93
|
+
## Rails 6.1.4.2 (December 14, 2021) ##
|
102
94
|
|
103
95
|
* No changes.
|
104
96
|
|
105
97
|
|
106
|
-
## Rails 6.
|
98
|
+
## Rails 6.1.4.1 (August 19, 2021) ##
|
107
99
|
|
108
100
|
* No changes.
|
109
101
|
|
110
102
|
|
111
|
-
## Rails 6.
|
112
|
-
|
113
|
-
* Cache compiled view templates when running tests by default
|
114
|
-
|
115
|
-
When generating a new app without `--skip-spring`, caching classes is
|
116
|
-
disabled in `environments/test.rb`. This implicitly disables caching
|
117
|
-
view templates too. This change will enable view template caching by
|
118
|
-
adding this to the generated `environments/test.rb`:
|
119
|
-
|
120
|
-
````ruby
|
121
|
-
config.action_view.cache_template_loading = true
|
122
|
-
````
|
123
|
-
|
124
|
-
*Jorge Manrubia*
|
125
|
-
|
126
|
-
* `Rails::Application#eager_load!` is available again to load application code
|
127
|
-
manually as it was possible in previous versions.
|
103
|
+
## Rails 6.1.4 (June 24, 2021) ##
|
128
104
|
|
129
|
-
|
130
|
-
runs when Rails boots with eager loading enabled, you can think of this
|
131
|
-
method as a vanilla recursive code loader.
|
105
|
+
* Fix compatibility with `psych >= 4`.
|
132
106
|
|
133
|
-
|
134
|
-
|
107
|
+
Starting in Psych 4.0.0 `YAML.load` behaves like `YAML.safe_load`. To preserve compatibility
|
108
|
+
`Rails.application.config_for` now uses `YAML.unsafe_load` if available.
|
135
109
|
|
136
|
-
*
|
110
|
+
*Jean Boussier*
|
137
111
|
|
138
|
-
*
|
112
|
+
* Ensure `Rails.application.config_for` always cast hashes to `ActiveSupport::OrderedOptions`.
|
139
113
|
|
140
|
-
*
|
114
|
+
*Jean Boussier*
|
141
115
|
|
142
|
-
*
|
143
|
-
namespaces which do not have eager load paths, like the recently added
|
144
|
-
`i18n`. These namespaces are only required to respond to `eager_load!`.
|
116
|
+
* Fix create migration generator with `--pretend` option.
|
145
117
|
|
146
|
-
*
|
118
|
+
*euxx*
|
147
119
|
|
148
120
|
|
149
|
-
## Rails 6.
|
121
|
+
## Rails 6.1.3.2 (May 05, 2021) ##
|
150
122
|
|
151
123
|
* No changes.
|
152
124
|
|
153
125
|
|
154
|
-
## Rails 6.
|
126
|
+
## Rails 6.1.3.1 (March 26, 2021) ##
|
155
127
|
|
156
128
|
* No changes.
|
157
129
|
|
158
130
|
|
159
|
-
## Rails 6.
|
160
|
-
|
161
|
-
* Fix the collision check for the scaffold generator.
|
131
|
+
## Rails 6.1.3 (February 17, 2021) ##
|
162
132
|
|
163
|
-
|
164
|
-
|
165
|
-
## Rails 6.0.1 (November 5, 2019) ##
|
166
|
-
|
167
|
-
* The `zeitwerk:check` Rake task reports files outside the app's root
|
168
|
-
directory, as in engines loaded from gems.
|
169
|
-
|
170
|
-
*Xavier Noria*
|
133
|
+
* No changes.
|
171
134
|
|
172
|
-
* Fixed a possible error when using the evented file update checker.
|
173
135
|
|
174
|
-
|
136
|
+
## Rails 6.1.2.1 (February 10, 2021) ##
|
175
137
|
|
176
|
-
*
|
177
|
-
included in the default `.gitignore` file for newly-generated apps.
|
138
|
+
* No changes.
|
178
139
|
|
179
|
-
*Yasuo Honda*
|
180
140
|
|
181
|
-
|
182
|
-
a server via `rackup` instead of `rails server`.
|
141
|
+
## Rails 6.1.2 (February 09, 2021) ##
|
183
142
|
|
184
|
-
|
143
|
+
* No changes.
|
185
144
|
|
186
145
|
|
187
|
-
## Rails 6.
|
146
|
+
## Rails 6.1.1 (January 07, 2021) ##
|
188
147
|
|
189
|
-
*
|
190
|
-
loaders printed to standard output. May be handy for troubleshooting.
|
148
|
+
* Allow spaces in path to Yarn binstub and only run on precompile if needed.
|
191
149
|
|
192
|
-
*
|
150
|
+
*Markus Doits*
|
193
151
|
|
152
|
+
* Populate ARGV for app template.
|
194
153
|
|
195
|
-
|
154
|
+
Fixes #40945.
|
196
155
|
|
197
|
-
*
|
198
|
-
users to opt-out from adding autoload paths to `$LOAD_PATH`. This flag is
|
199
|
-
`true` by default, but it is recommended to be set to `false` in `:zeitwerk`
|
200
|
-
mode early, in `config/application.rb`.
|
156
|
+
*Jonathan Hefner*
|
201
157
|
|
202
|
-
Zeitwerk uses only absolute paths internally, and applications running in
|
203
|
-
`:zeitwerk` mode do not need `require_dependency`, so models, controllers,
|
204
|
-
jobs, etc. do not need to be in `$LOAD_PATH`. Setting this to `false` saves
|
205
|
-
Ruby from checking these directories when resolving `require` calls with
|
206
|
-
relative paths, and saves Bootsnap work and RAM, since it does not need to
|
207
|
-
build an index for them.
|
208
158
|
|
209
|
-
|
159
|
+
## Rails 6.1.0 (December 09, 2020) ##
|
210
160
|
|
211
|
-
|
161
|
+
* Added `Railtie#server` hook called when Rails starts a server.
|
162
|
+
This is useful in case your application or a library needs to run
|
163
|
+
another process next to the Rails server. This is quite common in development
|
164
|
+
for instance to run the Webpack or the React server.
|
212
165
|
|
213
|
-
|
166
|
+
It can be used like this:
|
214
167
|
|
168
|
+
```ruby
|
169
|
+
class MyRailtie < Rails::Railtie
|
170
|
+
server do
|
171
|
+
WebpackServer.run
|
172
|
+
end
|
173
|
+
end
|
215
174
|
```
|
216
|
-
bin/rails zeitwerk:check
|
217
|
-
```
|
218
|
-
|
219
|
-
to check if the project structure they were using with the classic
|
220
|
-
autoloader is compatible with `:zeitwerk` mode.
|
221
|
-
|
222
|
-
*Matilda Smeds* & *Xavier Noria*
|
223
|
-
|
224
|
-
* Allow loading seeds without ActiveJob.
|
225
|
-
|
226
|
-
Fixes #35782
|
227
|
-
|
228
|
-
*Jeremy Weathers*
|
229
|
-
|
230
|
-
* `null: false` is set in the migrations by default for column pointed by
|
231
|
-
`belongs_to` / `references` association generated by model generator.
|
232
|
-
|
233
|
-
Also deprecate passing {required} to the model generator.
|
234
|
-
|
235
|
-
*Prathamesh Sonpatki*
|
236
|
-
|
237
|
-
* New applications get `config.cache_classes = false` in `config/environments/test.rb`
|
238
|
-
unless `--skip-spring`.
|
239
|
-
|
240
|
-
*Xavier Noria*
|
241
|
-
|
242
|
-
* Autoloading during initialization is deprecated.
|
243
|
-
|
244
|
-
*Xavier Noria*
|
245
|
-
|
246
|
-
* Only force `:async` ActiveJob adapter to `:inline` during seeding.
|
247
|
-
|
248
|
-
*BatedUrGonnaDie*
|
249
|
-
|
250
|
-
* The `connection` option of `rails dbconsole` command is deprecated in
|
251
|
-
favor of `database` option.
|
252
|
-
|
253
|
-
*Yuji Yaginuma*
|
254
|
-
|
255
|
-
* Replace `chromedriver-helper` gem with `webdrivers` in default Gemfile.
|
256
|
-
`chromedriver-helper` is deprecated as of March 31, 2019 and won't
|
257
|
-
receive any further updates.
|
258
175
|
|
259
|
-
*
|
176
|
+
*Edouard Chin*
|
260
177
|
|
261
|
-
*
|
262
|
-
to upgrade `bootsnap` to at least 1.4.2.
|
178
|
+
* Remove deprecated `rake dev:cache` tasks.
|
263
179
|
|
264
|
-
*
|
265
|
-
|
266
|
-
* Add `config.disable_sandbox` option to Rails console.
|
267
|
-
|
268
|
-
This setting will disable `rails console --sandbox` mode, preventing
|
269
|
-
developer from accidentally starting a sandbox console,
|
270
|
-
which when left inactive, can cause the database server to run out of memory.
|
271
|
-
|
272
|
-
*Prem Sichanugrist*
|
273
|
-
|
274
|
-
* Add `-e/--environment` option to `rails initializers`.
|
180
|
+
*Rafael Mendonça França*
|
275
181
|
|
276
|
-
|
182
|
+
* Remove deprecated `rake routes` tasks.
|
277
183
|
|
184
|
+
*Rafael Mendonça França*
|
278
185
|
|
279
|
-
|
186
|
+
* Remove deprecated `rake initializers` tasks.
|
280
187
|
|
281
|
-
*
|
188
|
+
*Rafael Mendonça França*
|
282
189
|
|
283
|
-
|
190
|
+
* Remove deprecated support for using the `HOST` environment variable to specify the server IP.
|
284
191
|
|
285
|
-
|
286
|
-
remote code execution.
|
192
|
+
*Rafael Mendonça França*
|
287
193
|
|
288
|
-
|
194
|
+
* Remove deprecated `server` argument from the rails server command.
|
289
195
|
|
290
|
-
*
|
196
|
+
*Rafael Mendonça França*
|
291
197
|
|
198
|
+
* Remove deprecated `SOURCE_ANNOTATION_DIRECTORIES` environment variable support from `rails notes`.
|
292
199
|
|
293
|
-
|
200
|
+
*Rafael Mendonça França*
|
294
201
|
|
295
|
-
*
|
296
|
-
being broken by allowing non-symbol access with a deprecation notice.
|
202
|
+
* Remove deprecated `connection` option in the `rails dbconsole` command.
|
297
203
|
|
298
|
-
*
|
204
|
+
*Rafael Mendonça França*
|
299
205
|
|
300
|
-
*
|
206
|
+
* Remove depreated `rake notes` tasks.
|
301
207
|
|
302
|
-
*
|
208
|
+
*Rafael Mendonça França*
|
303
209
|
|
210
|
+
* Return a 405 Method Not Allowed response when a request uses an unknown HTTP method.
|
304
211
|
|
305
|
-
|
212
|
+
Fixes #38998.
|
306
213
|
|
307
|
-
*
|
214
|
+
*Loren Norman*
|
308
215
|
|
309
|
-
|
216
|
+
* Make railsrc file location xdg-specification compliant
|
310
217
|
|
311
|
-
|
218
|
+
`rails new` will now look for the default `railsrc` file at
|
219
|
+
`$XDG_CONFIG_HOME/rails/railsrc` (or `~/.config/rails/railsrc` if
|
220
|
+
`XDG_CONFIG_HOME` is not set). If this file does not exist, `rails new`
|
221
|
+
will fall back to `~/.railsrc`.
|
312
222
|
|
313
|
-
|
223
|
+
The fallback behaviour means this does not cause any breaking changes.
|
314
224
|
|
315
|
-
*
|
225
|
+
*Nick Wolf*
|
316
226
|
|
317
|
-
|
227
|
+
* Change the default logging level from :debug to :info to avoid inadvertent exposure of personally
|
228
|
+
identifiable information (PII) in production environments.
|
318
229
|
|
319
|
-
*
|
230
|
+
*Eric M. Payne*
|
320
231
|
|
321
|
-
|
232
|
+
* Automatically generate abstract class when using multiple databases.
|
322
233
|
|
323
|
-
|
234
|
+
When generating a scaffold for a multiple database application, Rails will now automatically generate the abstract class for the database when the database argument is passed. This abstract class will include the connection information for the writing configuration and any models generated for that database will automatically inherit from the abstract class.
|
324
235
|
|
325
|
-
|
236
|
+
Usage:
|
326
237
|
|
327
|
-
|
238
|
+
```bash
|
239
|
+
$ bin/rails generate scaffold Pet name:string --database=animals
|
240
|
+
```
|
328
241
|
|
329
|
-
|
242
|
+
Will create an abstract class for the animals connection.
|
330
243
|
|
331
|
-
|
244
|
+
```ruby
|
245
|
+
class AnimalsRecord < ApplicationRecord
|
246
|
+
self.abstract_class = true
|
332
247
|
|
333
|
-
|
334
|
-
|
335
|
-
force config/database.yml
|
336
|
-
gsub Gemfile
|
248
|
+
connects_to database: { writing: :animals }
|
249
|
+
end
|
337
250
|
```
|
338
251
|
|
339
|
-
|
340
|
-
the target database adapter into your app, and replaces your database gem
|
341
|
-
with the target database gem.
|
252
|
+
And generate a `Pet` model that inherits from the new `AnimalsRecord`:
|
342
253
|
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
*bogdanvlviv*
|
254
|
+
```ruby
|
255
|
+
class Pet < AnimalsRecord
|
256
|
+
end
|
257
|
+
```
|
348
258
|
|
349
|
-
|
259
|
+
If you already have an abstract class and it follows a different pattern than Rails defaults, you can pass a parent class with the database argument.
|
350
260
|
|
351
|
-
|
261
|
+
```bash
|
262
|
+
$ bin/rails generate scaffold Pet name:string --database=animals --parent=SecondaryBase
|
263
|
+
```
|
352
264
|
|
353
|
-
|
265
|
+
This will ensure the model inherits from the `SecondaryBase` parent instead of `AnimalsRecord`
|
354
266
|
|
355
|
-
|
356
|
-
|
357
|
-
|
267
|
+
```ruby
|
268
|
+
class Pet < SecondaryBase
|
269
|
+
end
|
270
|
+
```
|
358
271
|
|
359
|
-
*
|
272
|
+
*Eileen M. Uchitelle*, *John Crepezzi*
|
360
273
|
|
361
|
-
*
|
274
|
+
* Accept params from url to prepopulate the Inbound Emails form in Rails conductor.
|
362
275
|
|
363
|
-
*
|
276
|
+
*Chris Oliver*
|
364
277
|
|
365
|
-
*
|
278
|
+
* Create a new rails app using a minimal stack.
|
366
279
|
|
367
|
-
|
368
|
-
against DNS rebinding and other `Host` header attacks. It is included in
|
369
|
-
the development environment by default with the following configuration:
|
280
|
+
`rails new cool_app --minimal`
|
370
281
|
|
371
|
-
|
372
|
-
IPAddr.new("0.0.0.0/0"), # All IPv4 addresses.
|
373
|
-
IPAddr.new("::/0"), # All IPv6 addresses.
|
374
|
-
"localhost" # The localhost reserved domain.
|
375
|
-
]
|
282
|
+
All the following are excluded from your minimal stack:
|
376
283
|
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
284
|
+
- action_cable
|
285
|
+
- action_mailbox
|
286
|
+
- action_mailer
|
287
|
+
- action_text
|
288
|
+
- active_job
|
289
|
+
- active_storage
|
290
|
+
- bootsnap
|
291
|
+
- jbuilder
|
292
|
+
- spring
|
293
|
+
- system_tests
|
294
|
+
- turbolinks
|
295
|
+
- webpack
|
381
296
|
|
382
|
-
|
297
|
+
*Haroon Ahmed*, *DHH*
|
383
298
|
|
384
|
-
|
385
|
-
|
386
|
-
`Proc` and `IPAddr` to name a few. Here is an example with a regexp.
|
299
|
+
* Add default ENV variable option with BACKTRACE to turn off backtrace cleaning when debugging framework code in the
|
300
|
+
generated config/initializers/backtrace_silencers.rb.
|
387
301
|
|
388
|
-
|
389
|
-
# `beta1.product.com`.
|
390
|
-
Rails.application.config.hosts << /.*\.product\.com/
|
302
|
+
`BACKTRACE=1 ./bin/rails runner "MyClass.perform"`
|
391
303
|
|
392
|
-
|
304
|
+
*DHH*
|
393
305
|
|
394
|
-
|
395
|
-
|
396
|
-
Rails.application.config.hosts << ".product.com"
|
306
|
+
* The autoloading guide for Zeitwerk mode documents how to autoload classes
|
307
|
+
during application boot in a safe way.
|
397
308
|
|
398
|
-
*
|
309
|
+
*Haroon Ahmed*, *Xavier Noria*
|
399
310
|
|
400
|
-
*
|
311
|
+
* The `classic` autoloader starts its deprecation cycle.
|
401
312
|
|
402
|
-
|
313
|
+
New Rails projects are strongly discouraged from using `classic`, and we recommend that existing projects running on `classic` switch to `zeitwerk` mode when upgrading. Please check the [_Upgrading Ruby on Rails_](https://guides.rubyonrails.org/upgrading_ruby_on_rails.html) guide for tips.
|
403
314
|
|
404
|
-
*
|
315
|
+
*Xavier Noria*
|
405
316
|
|
406
|
-
|
317
|
+
* Adds `rails test:all` for running all tests in the test directory.
|
407
318
|
|
408
|
-
|
319
|
+
This runs all test files in the test directory, including system tests.
|
409
320
|
|
410
|
-
*
|
321
|
+
*Niklas Häusele*
|
411
322
|
|
412
|
-
*
|
323
|
+
* Add `config.generators.after_generate` for processing to generated files.
|
413
324
|
|
414
|
-
|
325
|
+
Register a callback that will get called right after generators has finished.
|
415
326
|
|
416
|
-
*
|
417
|
-
out (`generate`, `rake`, `rails_command`) to abort the generator if the
|
418
|
-
command fails.
|
327
|
+
*Yuji Yaginuma*
|
419
328
|
|
420
|
-
|
329
|
+
* Make test file patterns configurable via Environment variables
|
421
330
|
|
422
|
-
|
331
|
+
This makes test file patterns configurable via two environment variables:
|
332
|
+
`DEFAULT_TEST`, to configure files to test, and `DEFAULT_TEST_EXCLUDE`,
|
333
|
+
to configure files to exclude from testing.
|
423
334
|
|
424
|
-
|
335
|
+
These values were hardcoded before, which made it difficult to add
|
336
|
+
new categories of tests that should not be executed by default (e.g:
|
337
|
+
smoke tests).
|
425
338
|
|
426
|
-
*
|
339
|
+
*Jorge Manrubia*
|
427
340
|
|
428
|
-
|
341
|
+
* No longer include `rake rdoc` task when generating plugins.
|
429
342
|
|
430
|
-
|
343
|
+
To generate docs, use the `rdoc lib` command instead.
|
431
344
|
|
432
|
-
*
|
433
|
-
Subtasks are also added to get the status of individual databases (eg. `rails db:migrate:status:animals`).
|
345
|
+
*Jonathan Hefner*
|
434
346
|
|
435
|
-
|
347
|
+
* Allow relative paths with trailing slashes to be passed to `rails test`.
|
436
348
|
|
437
|
-
*
|
438
|
-
Sprockets is now solely in charge, by default, of compiling CSS and other static assets.
|
439
|
-
Action Cable channel generators will create ES6 stubs rather than use CoffeeScript.
|
440
|
-
Active Storage, Action Cable, Turbolinks, and Rails-UJS are loaded by a new application.js pack.
|
441
|
-
Generators no longer generate JavaScript stubs.
|
349
|
+
*Eugene Kenny*
|
442
350
|
|
443
|
-
|
351
|
+
* Add `rack-mini-profiler` gem to the default `Gemfile`.
|
444
352
|
|
445
|
-
|
446
|
-
|
447
|
-
|
353
|
+
`rack-mini-profiler` displays performance information such as SQL time and flame graphs.
|
354
|
+
It's enabled by default in development environment, but can be enabled in production as well.
|
355
|
+
See the gem [README](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md) for information on how to enable it in production.
|
448
356
|
|
449
|
-
|
450
|
-
bin/rails g model Room capacity:integer --database=kingston
|
451
|
-
invoke active_record
|
452
|
-
create db/kingston_migrate/20180830151055_create_rooms.rb
|
453
|
-
```
|
357
|
+
*Osama Sayegh*
|
454
358
|
|
455
|
-
|
456
|
-
also specify a database with the scaffold generator.
|
359
|
+
* `rails stats` will now count TypeScript files toward JavaScript stats.
|
457
360
|
|
458
|
-
*
|
361
|
+
*Joshua Cody*
|
459
362
|
|
460
|
-
*
|
461
|
-
that does not explicitly support it. Custom cache keys that do support this feature
|
462
|
-
can bypass this error by implementing the `supports_cache_versioning?` method on their
|
463
|
-
class and returning a truthy value.
|
363
|
+
* Run `git init` when generating plugins.
|
464
364
|
|
465
|
-
|
365
|
+
Opt out with `--skip-git`.
|
466
366
|
|
467
|
-
*
|
367
|
+
*OKURA Masafumi*
|
468
368
|
|
469
|
-
|
470
|
-
to `config/credentials.yml.enc`.
|
369
|
+
* Add benchmark generator.
|
471
370
|
|
472
|
-
|
371
|
+
Introduce benchmark generator to benchmark Rails applications.
|
473
372
|
|
474
|
-
|
475
|
-
If no override is set up for the passed environment, it will be created.
|
373
|
+
`rails generate benchmark opt_compare`
|
476
374
|
|
477
|
-
|
375
|
+
This creates a benchmark file that uses [`benchmark-ips`](https://github.com/evanphx/benchmark-ips).
|
376
|
+
By default, two code blocks can be benchmarked using the `before` and `after` reports.
|
478
377
|
|
479
|
-
|
480
|
-
|
378
|
+
You can run the generated benchmark file using:
|
379
|
+
`ruby script/benchmarks/opt_compare.rb`
|
481
380
|
|
482
|
-
*
|
381
|
+
*Kevin Jalbert*, *Gannon McGibbon*
|
483
382
|
|
484
|
-
*
|
383
|
+
* Cache compiled view templates when running tests by default.
|
485
384
|
|
486
|
-
|
385
|
+
When generating a new app without `--skip-spring`, caching classes is
|
386
|
+
disabled in `environments/test.rb`. This implicitly disables caching
|
387
|
+
view templates too. This change will enable view template caching by
|
388
|
+
adding this to the generated `environments/test.rb`:
|
487
389
|
|
488
|
-
|
390
|
+
```ruby
|
391
|
+
config.action_view.cache_template_loading = true
|
392
|
+
```
|
489
393
|
|
490
|
-
*
|
394
|
+
*Jorge Manrubia*
|
491
395
|
|
492
|
-
*
|
396
|
+
* Introduce middleware move operations.
|
493
397
|
|
494
|
-
|
495
|
-
|
496
|
-
`--database` option to the generator to make sure the the migration
|
497
|
-
is inserted into the correct folder.
|
398
|
+
With this change, you no longer need to delete and reinsert a middleware to
|
399
|
+
move it from one place to another in the stack:
|
498
400
|
|
401
|
+
```ruby
|
402
|
+
config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns
|
499
403
|
```
|
500
|
-
rails g migration CreateHouses --database=kingston
|
501
|
-
invoke active_record
|
502
|
-
create db/kingston_migrate/20180830151055_create_houses.rb
|
503
|
-
```
|
504
|
-
|
505
|
-
*Eileen M. Uchitelle*
|
506
404
|
|
507
|
-
|
508
|
-
|
509
|
-
*Yuji Yaginuma*
|
405
|
+
This will move the `Magical::Unicorns` middleware before
|
406
|
+
`ActionDispatch::Flash`. You can also move it after with:
|
510
407
|
|
511
|
-
|
408
|
+
```ruby
|
409
|
+
config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns
|
410
|
+
```
|
512
411
|
|
513
|
-
*
|
412
|
+
*Genadi Samokovarov*
|
514
413
|
|
515
|
-
*
|
414
|
+
* Generators that inherit from NamedBase respect `--force` option.
|
516
415
|
|
517
|
-
*
|
416
|
+
*Josh Brody*
|
518
417
|
|
519
|
-
*
|
418
|
+
* Allow configuration of eager_load behaviour for rake environment:
|
520
419
|
|
521
|
-
|
522
|
-
- `rails notes:custom ANNOTATION=custom` is deprecated in favor of using `rails notes -a custom`.
|
523
|
-
- `rails notes:optimize` is deprecated in favor of using `rails notes -a OPTIMIZE`.
|
524
|
-
- `rails notes:todo` is deprecated in favor of using`rails notes -a TODO`.
|
525
|
-
- `rails notes:fixme` is deprecated in favor of using `rails notes -a FIXME`.
|
420
|
+
config.rake_eager_load
|
526
421
|
|
527
|
-
|
422
|
+
Defaults to `false` as per previous behaviour.
|
528
423
|
|
529
|
-
*
|
530
|
-
through `Rails::SourceAnnotationExtractor::Annotation` in favor of using `config.annotations.register_directories`.
|
424
|
+
*Thierry Joyal*
|
531
425
|
|
532
|
-
|
426
|
+
* Ensure Rails migration generator respects system-wide primary key config.
|
533
427
|
|
534
|
-
|
428
|
+
When rails is configured to use a specific primary key type:
|
535
429
|
|
536
|
-
|
430
|
+
```ruby
|
431
|
+
config.generators do |g|
|
432
|
+
g.orm :active_record, primary_key_type: :uuid
|
433
|
+
end
|
434
|
+
```
|
537
435
|
|
538
|
-
|
436
|
+
Previously:
|
539
437
|
|
540
|
-
|
438
|
+
```bash
|
439
|
+
$ bin/rails g migration add_location_to_users location:references
|
440
|
+
```
|
541
441
|
|
542
|
-
|
442
|
+
The references line in the migration would not have `type: :uuid`.
|
443
|
+
This change causes the type to be applied appropriately.
|
543
444
|
|
544
|
-
|
445
|
+
*Louis-Michel Couture*, *Dermot Haughey*
|
545
446
|
|
546
|
-
|
447
|
+
* Deprecate `Rails::DBConsole#config`.
|
547
448
|
|
548
|
-
|
549
|
-
POSIX-compliant systems.
|
449
|
+
`Rails::DBConsole#config` is deprecated without replacement. Use `Rails::DBConsole.db_config.configuration_hash` instead.
|
550
450
|
|
551
|
-
|
451
|
+
*Eileen M. Uchitelle*, *John Crepezzi*
|
552
452
|
|
553
|
-
|
554
|
-
-rw-r--r-- 1 owner group 32 Jan 1 00:00 master.key
|
453
|
+
* `Rails.application.config_for` merges shared configuration deeply.
|
555
454
|
|
556
|
-
|
455
|
+
```yaml
|
456
|
+
# config/example.yml
|
457
|
+
shared:
|
458
|
+
foo:
|
459
|
+
bar:
|
460
|
+
baz: 1
|
461
|
+
development:
|
462
|
+
foo:
|
463
|
+
bar:
|
464
|
+
qux: 2
|
465
|
+
```
|
557
466
|
|
558
|
-
|
559
|
-
|
467
|
+
```ruby
|
468
|
+
# Previously
|
469
|
+
Rails.application.config_for(:example)[:foo][:bar] #=> { qux: 2 }
|
560
470
|
|
561
|
-
|
471
|
+
# Now
|
472
|
+
Rails.application.config_for(:example)[:foo][:bar] #=> { baz: 1, qux: 2 }
|
473
|
+
```
|
562
474
|
|
563
|
-
*
|
475
|
+
*Yuhei Kiriyama*
|
564
476
|
|
565
|
-
*
|
477
|
+
* Remove access to values in nested hashes returned by `Rails.application.config_for` via String keys.
|
566
478
|
|
567
|
-
|
479
|
+
```yaml
|
480
|
+
# config/example.yml
|
481
|
+
development:
|
482
|
+
options:
|
483
|
+
key: value
|
484
|
+
```
|
568
485
|
|
569
|
-
|
486
|
+
```ruby
|
487
|
+
Rails.application.config_for(:example).options
|
488
|
+
```
|
570
489
|
|
571
|
-
|
490
|
+
This used to return a Hash on which you could access values with String keys. This was deprecated in 6.0, and now doesn't work anymore.
|
572
491
|
|
573
|
-
|
492
|
+
*Étienne Barrié*
|
574
493
|
|
575
|
-
|
494
|
+
* Configuration files for environments (`config/environments/*.rb`) are
|
495
|
+
now able to modify `autoload_paths`, `autoload_once_paths`, and
|
496
|
+
`eager_load_paths`.
|
576
497
|
|
577
|
-
|
498
|
+
As a consequence, applications cannot autoload within those files. Before, they technically could, but changes in autoloaded classes or modules had no effect anyway in the configuration because reloading does not reboot.
|
578
499
|
|
579
|
-
|
580
|
-
`--using` option with the `-u` short switch.
|
500
|
+
Ways to use application code in these files:
|
581
501
|
|
582
|
-
|
502
|
+
* Define early in the boot process a class that is not reloadable, from which the application takes configuration values that get passed to the framework.
|
583
503
|
|
584
|
-
|
504
|
+
```ruby
|
505
|
+
# In config/application.rb, for example.
|
506
|
+
require "#{Rails.root}/lib/my_app/config"
|
585
507
|
|
586
|
-
|
587
|
-
|
508
|
+
# In config/environments/development.rb, for example.
|
509
|
+
config.foo = MyApp::Config.foo
|
510
|
+
```
|
588
511
|
|
589
|
-
*
|
512
|
+
* If the class has to be reloadable, then wrap the configuration code in a `to_prepare` block:
|
590
513
|
|
591
|
-
|
592
|
-
|
514
|
+
```ruby
|
515
|
+
config.to_prepare do
|
516
|
+
config.foo = MyModel.foo
|
517
|
+
end
|
518
|
+
```
|
593
519
|
|
594
|
-
|
595
|
-
$ rails routes --expanded
|
596
|
-
--[ Route 1 ]------------------------------------------------------------
|
597
|
-
Prefix | high_scores
|
598
|
-
Verb | GET
|
599
|
-
URI | /high_scores(.:format)
|
600
|
-
Controller#Action | high_scores#index
|
601
|
-
--[ Route 2 ]------------------------------------------------------------
|
602
|
-
Prefix | new_high_score
|
603
|
-
Verb | GET
|
604
|
-
URI | /high_scores/new(.:format)
|
605
|
-
Controller#Action | high_scores#new
|
606
|
-
```
|
520
|
+
That assigns the latest `MyModel.foo` to `config.foo` when the application boots, and each time there is a reload. But whether that has an effect or not depends on the configuration point, since it is not uncommon for engines to read the application configuration during initialization and set their own state from them. That process happens only on boot, not on reloads, and if that is how `config.foo` worked, resetting it would have no effect in the state of the engine.
|
607
521
|
|
608
|
-
*
|
522
|
+
*Allen Hsu* & *Xavier Noria*
|
609
523
|
|
610
|
-
*
|
524
|
+
* Support using environment variable to set pidfile.
|
611
525
|
|
612
|
-
*
|
526
|
+
*Ben Thorner*
|
613
527
|
|
614
528
|
|
615
|
-
Please check [
|
529
|
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/railties/CHANGELOG.md) for previous changes.
|