railties 7.1.5.2 → 7.2.0.beta1
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 +174 -806
- data/lib/minitest/rails_plugin.rb +5 -2
- data/lib/rails/all.rb +1 -3
- data/lib/rails/api/task.rb +3 -2
- data/lib/rails/application/bootstrap.rb +5 -6
- data/lib/rails/application/configuration.rb +31 -36
- data/lib/rails/application/dummy_config.rb +2 -2
- data/lib/rails/application/finisher.rb +7 -0
- data/lib/rails/application.rb +13 -57
- data/lib/rails/backtrace_cleaner.rb +14 -1
- data/lib/rails/cli.rb +0 -1
- data/lib/rails/command.rb +1 -1
- data/lib/rails/commands/app/update_command.rb +86 -0
- data/lib/rails/commands/console/console_command.rb +2 -21
- data/lib/rails/commands/console/irb_console.rb +137 -0
- data/lib/rails/commands/credentials/credentials_command.rb +2 -2
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +21 -30
- data/lib/rails/commands/devcontainer/devcontainer_command.rb +34 -0
- data/lib/rails/commands/rake/rake_command.rb +1 -1
- data/lib/rails/commands/runner/runner_command.rb +14 -3
- data/lib/rails/commands/server/server_command.rb +5 -3
- data/lib/rails/commands/test/test_command.rb +2 -0
- data/lib/rails/configuration.rb +10 -1
- data/lib/rails/console/app.rb +5 -32
- data/lib/rails/console/helpers.rb +5 -16
- data/lib/rails/console/methods.rb +23 -0
- data/lib/rails/engine.rb +5 -5
- data/lib/rails/gem_version.rb +3 -3
- data/lib/rails/generators/app_base.rb +70 -49
- data/lib/rails/generators/base.rb +5 -1
- data/lib/rails/generators/database.rb +227 -69
- 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 +26 -1
- data/lib/rails/generators/rails/app/app_generator.rb +52 -23
- data/lib/rails/generators/rails/app/templates/Dockerfile.tt +23 -14
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +16 -16
- 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/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 +6 -2
- data/lib/rails/generators/rails/app/templates/config/application.rb.tt +1 -1
- 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 +7 -0
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +8 -1
- data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +11 -6
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +2 -0
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +6 -5
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +70 -0
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +39 -29
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +4 -0
- data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +5 -0
- data/lib/rails/generators/rails/app/templates/dockerignore.tt +13 -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 +3 -3
- 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/controller/controller_generator.rb +1 -1
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +131 -20
- data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +166 -0
- data/lib/rails/generators/rails/migration/migration_generator.rb +4 -0
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +38 -7
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +5 -1
- 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/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/test_unit/scaffold/scaffold_generator.rb +10 -0
- 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/behavior.rb +7 -6
- data/lib/rails/generators.rb +1 -1
- data/lib/rails/health_controller.rb +1 -1
- data/lib/rails/info.rb +2 -2
- data/lib/rails/info_controller.rb +2 -4
- data/lib/rails/mailers_controller.rb +14 -1
- data/lib/rails/paths.rb +2 -2
- data/lib/rails/pwa_controller.rb +15 -0
- data/lib/rails/rack/logger.rb +15 -7
- data/lib/rails/railtie/configurable.rb +2 -2
- data/lib/rails/railtie.rb +15 -16
- data/lib/rails/tasks/framework.rake +0 -26
- data/lib/rails/tasks/tmp.rake +1 -1
- data/lib/rails/templates/layouts/application.html.erb +1 -1
- data/lib/rails/templates/rails/mailers/email.html.erb +12 -8
- data/lib/rails/templates/rails/welcome/index.html.erb +3 -2
- data/lib/rails/test_help.rb +2 -4
- data/lib/rails/test_unit/reporter.rb +8 -2
- data/lib/rails/test_unit/runner.rb +21 -2
- data/lib/rails/test_unit/test_parser.rb +45 -0
- data/lib/rails.rb +6 -3
- metadata +41 -32
- data/lib/rails/app_updater.rb +0 -52
- data/lib/rails/commands/secrets/USAGE +0 -61
- data/lib/rails/commands/secrets/secrets_command.rb +0 -47
- data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +0 -68
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +0 -54
- 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_1.rb.tt +0 -280
- 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/ruby_version_check.rb +0 -17
- data/lib/rails/secrets.rb +0 -110
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.2.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: activesupport
|
@@ -15,28 +16,28 @@ dependencies:
|
|
15
16
|
requirements:
|
16
17
|
- - '='
|
17
18
|
- !ruby/object:Gem::Version
|
18
|
-
version: 7.
|
19
|
+
version: 7.2.0.beta1
|
19
20
|
type: :runtime
|
20
21
|
prerelease: false
|
21
22
|
version_requirements: !ruby/object:Gem::Requirement
|
22
23
|
requirements:
|
23
24
|
- - '='
|
24
25
|
- !ruby/object:Gem::Version
|
25
|
-
version: 7.
|
26
|
+
version: 7.2.0.beta1
|
26
27
|
- !ruby/object:Gem::Dependency
|
27
28
|
name: actionpack
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - '='
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: 7.
|
33
|
+
version: 7.2.0.beta1
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
36
|
version_requirements: !ruby/object:Gem::Requirement
|
36
37
|
requirements:
|
37
38
|
- - '='
|
38
39
|
- !ruby/object:Gem::Version
|
39
|
-
version: 7.
|
40
|
+
version: 7.2.0.beta1
|
40
41
|
- !ruby/object:Gem::Dependency
|
41
42
|
name: rackup
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,30 +104,30 @@ dependencies:
|
|
103
104
|
name: irb
|
104
105
|
requirement: !ruby/object:Gem::Requirement
|
105
106
|
requirements:
|
106
|
-
- - "
|
107
|
+
- - "~>"
|
107
108
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
109
|
+
version: '1.13'
|
109
110
|
type: :runtime
|
110
111
|
prerelease: false
|
111
112
|
version_requirements: !ruby/object:Gem::Requirement
|
112
113
|
requirements:
|
113
|
-
- - "
|
114
|
+
- - "~>"
|
114
115
|
- !ruby/object:Gem::Version
|
115
|
-
version: '
|
116
|
+
version: '1.13'
|
116
117
|
- !ruby/object:Gem::Dependency
|
117
118
|
name: actionview
|
118
119
|
requirement: !ruby/object:Gem::Requirement
|
119
120
|
requirements:
|
120
121
|
- - '='
|
121
122
|
- !ruby/object:Gem::Version
|
122
|
-
version: 7.
|
123
|
+
version: 7.2.0.beta1
|
123
124
|
type: :development
|
124
125
|
prerelease: false
|
125
126
|
version_requirements: !ruby/object:Gem::Requirement
|
126
127
|
requirements:
|
127
128
|
- - '='
|
128
129
|
- !ruby/object:Gem::Version
|
129
|
-
version: 7.
|
130
|
+
version: 7.2.0.beta1
|
130
131
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
131
132
|
email: david@loudthinking.com
|
132
133
|
executables:
|
@@ -145,7 +146,6 @@ files:
|
|
145
146
|
- lib/rails/api/generator.rb
|
146
147
|
- lib/rails/api/task.rb
|
147
148
|
- lib/rails/app_loader.rb
|
148
|
-
- lib/rails/app_updater.rb
|
149
149
|
- lib/rails/application.rb
|
150
150
|
- lib/rails/application/bootstrap.rb
|
151
151
|
- lib/rails/application/configuration.rb
|
@@ -168,8 +168,10 @@ files:
|
|
168
168
|
- lib/rails/command/helpers/editor.rb
|
169
169
|
- lib/rails/commands.rb
|
170
170
|
- lib/rails/commands/about/about_command.rb
|
171
|
+
- lib/rails/commands/app/update_command.rb
|
171
172
|
- lib/rails/commands/application/application_command.rb
|
172
173
|
- lib/rails/commands/console/console_command.rb
|
174
|
+
- lib/rails/commands/console/irb_console.rb
|
173
175
|
- lib/rails/commands/credentials/USAGE
|
174
176
|
- lib/rails/commands/credentials/credentials_command.rb
|
175
177
|
- lib/rails/commands/credentials/credentials_command/diffing.rb
|
@@ -177,6 +179,7 @@ files:
|
|
177
179
|
- lib/rails/commands/dbconsole/dbconsole_command.rb
|
178
180
|
- lib/rails/commands/destroy/destroy_command.rb
|
179
181
|
- lib/rails/commands/dev/dev_command.rb
|
182
|
+
- lib/rails/commands/devcontainer/devcontainer_command.rb
|
180
183
|
- lib/rails/commands/encrypted/USAGE
|
181
184
|
- lib/rails/commands/encrypted/encrypted_command.rb
|
182
185
|
- lib/rails/commands/gem_help/USAGE
|
@@ -195,8 +198,6 @@ files:
|
|
195
198
|
- lib/rails/commands/runner/USAGE
|
196
199
|
- lib/rails/commands/runner/runner_command.rb
|
197
200
|
- lib/rails/commands/secret/secret_command.rb
|
198
|
-
- lib/rails/commands/secrets/USAGE
|
199
|
-
- lib/rails/commands/secrets/secrets_command.rb
|
200
201
|
- lib/rails/commands/server/server_command.rb
|
201
202
|
- lib/rails/commands/test/USAGE
|
202
203
|
- lib/rails/commands/test/test_command.rb
|
@@ -205,6 +206,7 @@ files:
|
|
205
206
|
- lib/rails/configuration.rb
|
206
207
|
- lib/rails/console/app.rb
|
207
208
|
- lib/rails/console/helpers.rb
|
209
|
+
- lib/rails/console/methods.rb
|
208
210
|
- lib/rails/deprecator.rb
|
209
211
|
- lib/rails/dev_caching.rb
|
210
212
|
- lib/rails/engine.rb
|
@@ -258,22 +260,20 @@ files:
|
|
258
260
|
- lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt
|
259
261
|
- lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt
|
260
262
|
- lib/rails/generators/rails/app/templates/app/views/layouts/mailer.text.erb.tt
|
263
|
+
- lib/rails/generators/rails/app/templates/app/views/pwa/manifest.json.erb.tt
|
264
|
+
- lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js
|
265
|
+
- lib/rails/generators/rails/app/templates/bin/brakeman.tt
|
261
266
|
- lib/rails/generators/rails/app/templates/bin/rails.tt
|
262
267
|
- lib/rails/generators/rails/app/templates/bin/rake.tt
|
268
|
+
- lib/rails/generators/rails/app/templates/bin/rubocop.tt
|
263
269
|
- lib/rails/generators/rails/app/templates/bin/setup.tt
|
264
270
|
- lib/rails/generators/rails/app/templates/config.ru.tt
|
265
271
|
- lib/rails/generators/rails/app/templates/config/application.rb.tt
|
266
272
|
- lib/rails/generators/rails/app/templates/config/boot.rb.tt
|
267
273
|
- lib/rails/generators/rails/app/templates/config/cable.yml.tt
|
268
|
-
- lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt
|
269
|
-
- lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt
|
270
|
-
- lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt
|
271
|
-
- lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt
|
272
274
|
- lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt
|
273
|
-
- lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt
|
274
275
|
- lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt
|
275
276
|
- lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt
|
276
|
-
- lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt
|
277
277
|
- lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt
|
278
278
|
- lib/rails/generators/rails/app/templates/config/environment.rb.tt
|
279
279
|
- lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
|
@@ -284,7 +284,7 @@ files:
|
|
284
284
|
- lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt
|
285
285
|
- lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt
|
286
286
|
- lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt
|
287
|
-
- lib/rails/generators/rails/app/templates/config/initializers/
|
287
|
+
- lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt
|
288
288
|
- lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt
|
289
289
|
- lib/rails/generators/rails/app/templates/config/locales/en.yml
|
290
290
|
- lib/rails/generators/rails/app/templates/config/puma.rb.tt
|
@@ -294,15 +294,18 @@ files:
|
|
294
294
|
- lib/rails/generators/rails/app/templates/docker-entrypoint.tt
|
295
295
|
- lib/rails/generators/rails/app/templates/dockerignore.tt
|
296
296
|
- lib/rails/generators/rails/app/templates/gitattributes.tt
|
297
|
+
- lib/rails/generators/rails/app/templates/github/ci.yml.tt
|
298
|
+
- lib/rails/generators/rails/app/templates/github/dependabot.yml
|
297
299
|
- lib/rails/generators/rails/app/templates/gitignore.tt
|
298
300
|
- lib/rails/generators/rails/app/templates/node-version.tt
|
299
301
|
- lib/rails/generators/rails/app/templates/public/404.html
|
302
|
+
- lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html
|
300
303
|
- lib/rails/generators/rails/app/templates/public/422.html
|
301
304
|
- lib/rails/generators/rails/app/templates/public/500.html
|
302
|
-
- lib/rails/generators/rails/app/templates/public/
|
303
|
-
- lib/rails/generators/rails/app/templates/public/
|
304
|
-
- lib/rails/generators/rails/app/templates/public/favicon.ico
|
305
|
+
- lib/rails/generators/rails/app/templates/public/icon.png
|
306
|
+
- lib/rails/generators/rails/app/templates/public/icon.svg
|
305
307
|
- lib/rails/generators/rails/app/templates/public/robots.txt
|
308
|
+
- lib/rails/generators/rails/app/templates/rubocop.yml.tt
|
306
309
|
- lib/rails/generators/rails/app/templates/ruby-version.tt
|
307
310
|
- lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt
|
308
311
|
- lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt
|
@@ -317,6 +320,7 @@ files:
|
|
317
320
|
- lib/rails/generators/rails/credentials/credentials_generator.rb
|
318
321
|
- lib/rails/generators/rails/credentials/templates/credentials.yml.tt
|
319
322
|
- lib/rails/generators/rails/db/system/change/change_generator.rb
|
323
|
+
- lib/rails/generators/rails/devcontainer/devcontainer_generator.rb
|
320
324
|
- lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
|
321
325
|
- lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb
|
322
326
|
- lib/rails/generators/rails/generator/USAGE
|
@@ -347,8 +351,11 @@ files:
|
|
347
351
|
- lib/rails/generators/rails/plugin/templates/app/models/%namespaced_name%/application_record.rb.tt
|
348
352
|
- lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt
|
349
353
|
- lib/rails/generators/rails/plugin/templates/bin/rails.tt
|
354
|
+
- lib/rails/generators/rails/plugin/templates/bin/rubocop.tt
|
350
355
|
- lib/rails/generators/rails/plugin/templates/bin/test.tt
|
351
356
|
- lib/rails/generators/rails/plugin/templates/config/routes.rb.tt
|
357
|
+
- lib/rails/generators/rails/plugin/templates/github/ci.yml.tt
|
358
|
+
- lib/rails/generators/rails/plugin/templates/github/dependabot.yml
|
352
359
|
- lib/rails/generators/rails/plugin/templates/gitignore.tt
|
353
360
|
- lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb.tt
|
354
361
|
- lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt
|
@@ -361,6 +368,7 @@ files:
|
|
361
368
|
- lib/rails/generators/rails/plugin/templates/rails/javascripts.js.tt
|
362
369
|
- lib/rails/generators/rails/plugin/templates/rails/routes.rb.tt
|
363
370
|
- lib/rails/generators/rails/plugin/templates/rails/stylesheets.css
|
371
|
+
- lib/rails/generators/rails/plugin/templates/rubocop.yml.tt
|
364
372
|
- lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb.tt
|
365
373
|
- lib/rails/generators/rails/plugin/templates/test/application_system_test_case.rb.tt
|
366
374
|
- lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb.tt
|
@@ -417,14 +425,13 @@ files:
|
|
417
425
|
- lib/rails/mailers_controller.rb
|
418
426
|
- lib/rails/paths.rb
|
419
427
|
- lib/rails/plugin/test.rb
|
428
|
+
- lib/rails/pwa_controller.rb
|
420
429
|
- lib/rails/rack.rb
|
421
430
|
- lib/rails/rack/logger.rb
|
422
431
|
- lib/rails/rackup/server.rb
|
423
432
|
- lib/rails/railtie.rb
|
424
433
|
- lib/rails/railtie/configurable.rb
|
425
434
|
- lib/rails/railtie/configuration.rb
|
426
|
-
- lib/rails/ruby_version_check.rb
|
427
|
-
- lib/rails/secrets.rb
|
428
435
|
- lib/rails/source_annotation_extractor.rb
|
429
436
|
- lib/rails/tasks.rb
|
430
437
|
- lib/rails/tasks/engine.rake
|
@@ -458,11 +465,12 @@ licenses:
|
|
458
465
|
- MIT
|
459
466
|
metadata:
|
460
467
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
461
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.
|
462
|
-
documentation_uri: https://api.rubyonrails.org/v7.
|
468
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.0.beta1/railties/CHANGELOG.md
|
469
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.0.beta1/
|
463
470
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
464
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.
|
471
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.0.beta1/railties
|
465
472
|
rubygems_mfa_required: 'true'
|
473
|
+
post_install_message:
|
466
474
|
rdoc_options:
|
467
475
|
- "--exclude"
|
468
476
|
- "."
|
@@ -472,14 +480,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
472
480
|
requirements:
|
473
481
|
- - ">="
|
474
482
|
- !ruby/object:Gem::Version
|
475
|
-
version:
|
483
|
+
version: 3.1.0
|
476
484
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
477
485
|
requirements:
|
478
486
|
- - ">="
|
479
487
|
- !ruby/object:Gem::Version
|
480
488
|
version: '0'
|
481
489
|
requirements: []
|
482
|
-
rubygems_version: 3.
|
490
|
+
rubygems_version: 3.5.10
|
491
|
+
signing_key:
|
483
492
|
specification_version: 4
|
484
493
|
summary: Tools for creating, working with, and running Rails applications.
|
485
494
|
test_files: []
|
data/lib/rails/app_updater.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/generators"
|
4
|
-
require "rails/generators/rails/app/app_generator"
|
5
|
-
|
6
|
-
module Rails
|
7
|
-
class AppUpdater # :nodoc:
|
8
|
-
class << self
|
9
|
-
def invoke_from_app_generator(method)
|
10
|
-
app_generator.send(method)
|
11
|
-
end
|
12
|
-
|
13
|
-
def app_generator
|
14
|
-
@app_generator ||= begin
|
15
|
-
gen = Rails::Generators::AppGenerator.new ["rails"], generator_options, destination_root: Rails.root
|
16
|
-
gen.send(:valid_const?) unless File.exist?(Rails.root.join("config", "application.rb"))
|
17
|
-
gen
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
def generator_options
|
23
|
-
options = { api: !!Rails.application.config.api_only, update: true }
|
24
|
-
options[:name] = Rails.application.class.name.chomp("::Application").underscore
|
25
|
-
options[:skip_active_job] = !defined?(ActiveJob::Railtie)
|
26
|
-
options[:skip_active_record] = !defined?(ActiveRecord::Railtie)
|
27
|
-
options[:skip_active_storage] = !defined?(ActiveStorage::Engine)
|
28
|
-
options[:skip_action_mailer] = !defined?(ActionMailer::Railtie)
|
29
|
-
options[:skip_action_mailbox] = !defined?(ActionMailbox::Engine)
|
30
|
-
options[:skip_action_text] = !defined?(ActionText::Engine)
|
31
|
-
options[:skip_action_cable] = !defined?(ActionCable::Engine)
|
32
|
-
options[:skip_test] = !defined?(Rails::TestUnitRailtie)
|
33
|
-
options[:skip_system_test] = Rails.application.config.generators.system_tests.nil?
|
34
|
-
options[:asset_pipeline] = asset_pipeline
|
35
|
-
options[:skip_asset_pipeline] = asset_pipeline.nil?
|
36
|
-
options[:skip_bootsnap] = !defined?(Bootsnap)
|
37
|
-
options
|
38
|
-
end
|
39
|
-
|
40
|
-
def asset_pipeline
|
41
|
-
case
|
42
|
-
when defined?(Sprockets::Railtie)
|
43
|
-
"sprockets"
|
44
|
-
when defined?(Propshaft::Railtie)
|
45
|
-
"propshaft"
|
46
|
-
else
|
47
|
-
nil
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
Description:
|
2
|
-
** DEPRECATED **
|
3
|
-
Rails 5.2 has introduced a new `credentials` API that replaces Rails secrets.
|
4
|
-
Please use the Rails `credentials` commands instead.
|
5
|
-
Run `bin/rails credentials:help` for more information.
|
6
|
-
|
7
|
-
The Rails `secrets` commands helps encrypting secrets to slim a production
|
8
|
-
environment's `ENV` hash. It's also useful for atomic deploys: no need to
|
9
|
-
coordinate key changes to get everything working as the keys are shipped
|
10
|
-
with the code.
|
11
|
-
|
12
|
-
Setup:
|
13
|
-
Run `<%= executable(:setup) %>` to opt in and generate the `config/secrets.yml.key`
|
14
|
-
and `config/secrets.yml.enc` files.
|
15
|
-
|
16
|
-
The latter contains all the keys to be encrypted while the former holds the
|
17
|
-
encryption key.
|
18
|
-
|
19
|
-
Don't lose the key! Put it in a password manager your team can access.
|
20
|
-
Should you lose it no one, including you, will be able to access any encrypted
|
21
|
-
secrets.
|
22
|
-
Don't commit the key! Add `config/secrets.yml.key` to your source control's
|
23
|
-
ignore file. If you use Git, Rails handles this for you.
|
24
|
-
|
25
|
-
Rails also looks for the key in `ENV["RAILS_MASTER_KEY"]` if that's easier to
|
26
|
-
manage.
|
27
|
-
|
28
|
-
You could prepend that to your server's start command like this:
|
29
|
-
|
30
|
-
RAILS_MASTER_KEY="im-the-master-now-hahaha" bin/rails server
|
31
|
-
|
32
|
-
The `config/secrets.yml.enc` has much the same format as `config/secrets.yml`:
|
33
|
-
|
34
|
-
production:
|
35
|
-
secret_key_base: so-secret-very-hidden-wow
|
36
|
-
payment_processing_gateway_key: much-safe-very-gaedwey-wow
|
37
|
-
|
38
|
-
But that's where the similarities between `secrets.yml` and `secrets.yml.enc`
|
39
|
-
end, e.g. no keys from `secrets.yml` will be moved to `secrets.yml.enc` and
|
40
|
-
be encrypted.
|
41
|
-
|
42
|
-
A `shared:` top level key is also supported such that any keys there is merged
|
43
|
-
into the other environments.
|
44
|
-
|
45
|
-
Additionally, Rails won't read encrypted secrets out of the box even if you have
|
46
|
-
the key. Add this:
|
47
|
-
|
48
|
-
config.read_encrypted_secrets = true
|
49
|
-
|
50
|
-
to the environment you'd like to read encrypted secrets. `<%= executable(:setup) %>`
|
51
|
-
inserts this into the production environment by default.
|
52
|
-
|
53
|
-
Editing Secrets:
|
54
|
-
After `<%= executable(:setup) %>`, run `<%= executable(:edit) %>`.
|
55
|
-
|
56
|
-
That command opens a temporary file in `$VISUAL` or `$EDITOR` with the decrypted
|
57
|
-
contents of `config/secrets.yml.enc` to edit the encrypted secrets.
|
58
|
-
|
59
|
-
When the temporary file is next saved the contents are encrypted and written to
|
60
|
-
`config/secrets.yml.enc` while the file itself is destroyed to prevent secrets
|
61
|
-
from leaking.
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "active_support"
|
4
|
-
require "active_support/core_ext/string/filters"
|
5
|
-
require "rails/secrets"
|
6
|
-
require "rails/command/helpers/editor"
|
7
|
-
|
8
|
-
module Rails
|
9
|
-
module Command
|
10
|
-
class SecretsCommand < Rails::Command::Base # :nodoc:
|
11
|
-
include Helpers::Editor
|
12
|
-
|
13
|
-
desc "edit", "**deprecated** Open the secrets in `$VISUAL` or `$EDITOR` for editing"
|
14
|
-
def edit
|
15
|
-
Rails.deprecator.warn(<<~MSG.squish)
|
16
|
-
`bin/rails secrets:edit` is deprecated in favor of credentials and will be removed in Rails 7.2.
|
17
|
-
Run `bin/rails credentials:help` for more information.
|
18
|
-
MSG
|
19
|
-
|
20
|
-
boot_application!
|
21
|
-
|
22
|
-
using_system_editor do
|
23
|
-
Rails::Secrets.read_for_editing { |tmp_path| system_editor(tmp_path) }
|
24
|
-
say "File encrypted and saved."
|
25
|
-
end
|
26
|
-
rescue Rails::Secrets::MissingKeyError => error
|
27
|
-
say error.message
|
28
|
-
rescue Errno::ENOENT => error
|
29
|
-
if error.message.include?("secrets.yml.enc")
|
30
|
-
exit 1
|
31
|
-
else
|
32
|
-
raise
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
desc "show", "**deprecated** Show the decrypted secrets"
|
37
|
-
def show
|
38
|
-
Rails.deprecator.warn(<<~MSG.squish)
|
39
|
-
`bin/rails secrets:show` is deprecated in favor of credentials and will be removed in Rails 7.2.
|
40
|
-
Run `bin/rails credentials:help` for more information.
|
41
|
-
MSG
|
42
|
-
|
43
|
-
say Rails::Secrets.read
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,68 +0,0 @@
|
|
1
|
-
# If you are using mssql, derby, hsqldb, or h2 with one of the
|
2
|
-
# ActiveRecord JDBC adapters, install the appropriate driver, e.g.,:
|
3
|
-
# gem install activerecord-jdbcmssql-adapter
|
4
|
-
#
|
5
|
-
# Configure using Gemfile:
|
6
|
-
# gem "activerecord-jdbcmssql-adapter"
|
7
|
-
#
|
8
|
-
# development:
|
9
|
-
# adapter: mssql
|
10
|
-
# username: <%= app_name %>
|
11
|
-
# password:
|
12
|
-
# host: localhost
|
13
|
-
# database: <%= app_name %>_development
|
14
|
-
#
|
15
|
-
# Warning: The database defined as "test" will be erased and
|
16
|
-
# re-generated from your development database when you run "rake".
|
17
|
-
# Do not set this db to the same as development or production.
|
18
|
-
#
|
19
|
-
# test:
|
20
|
-
# adapter: mssql
|
21
|
-
# username: <%= app_name %>
|
22
|
-
# password:
|
23
|
-
# host: localhost
|
24
|
-
# database: <%= app_name %>_test
|
25
|
-
#
|
26
|
-
# production:
|
27
|
-
# adapter: mssql
|
28
|
-
# username: <%= app_name %>
|
29
|
-
# password:
|
30
|
-
# host: localhost
|
31
|
-
# database: <%= app_name %>_production
|
32
|
-
|
33
|
-
# If you are using oracle, db2, sybase, informix or prefer to use the plain
|
34
|
-
# JDBC adapter, configure your database setting as the example below (requires
|
35
|
-
# you to download and manually install the database vendor's JDBC driver .jar
|
36
|
-
# file). See your driver documentation for the appropriate driver class and
|
37
|
-
# connection string:
|
38
|
-
|
39
|
-
default: &default
|
40
|
-
adapter: jdbc
|
41
|
-
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
42
|
-
username: <%= app_name %>
|
43
|
-
password:
|
44
|
-
driver:
|
45
|
-
|
46
|
-
development:
|
47
|
-
<<: *default
|
48
|
-
url: jdbc:db://localhost/<%= app_name %>_development
|
49
|
-
|
50
|
-
# Warning: The database defined as "test" will be erased and
|
51
|
-
# re-generated from your development database when you run "rake".
|
52
|
-
# Do not set this db to the same as development or production.
|
53
|
-
test:
|
54
|
-
<<: *default
|
55
|
-
url: jdbc:db://localhost/<%= app_name %>_test
|
56
|
-
|
57
|
-
# As with config/credentials.yml, you never want to store sensitive information,
|
58
|
-
# like your database password, in your source code. If your source code is
|
59
|
-
# ever seen by anyone, they now have access to your database.
|
60
|
-
#
|
61
|
-
# Instead, provide the password as an environment variable when you boot the
|
62
|
-
# app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
|
63
|
-
# for a full overview on how database connection configuration can be specified.
|
64
|
-
#
|
65
|
-
production:
|
66
|
-
url: jdbc:db://localhost/<%= app_name %>_production
|
67
|
-
username: <%= app_name %>
|
68
|
-
password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# MySQL. Versions 5.5.8 and up are supported.
|
2
|
-
#
|
3
|
-
# Install the MySQL driver:
|
4
|
-
# gem install activerecord-jdbcmysql-adapter
|
5
|
-
#
|
6
|
-
# Configure Using Gemfile
|
7
|
-
# gem "activerecord-jdbcmysql-adapter"
|
8
|
-
#
|
9
|
-
# And be sure to use new-style password hashing:
|
10
|
-
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
|
11
|
-
#
|
12
|
-
default: &default
|
13
|
-
adapter: mysql
|
14
|
-
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
15
|
-
username: root
|
16
|
-
password:
|
17
|
-
host: localhost
|
18
|
-
|
19
|
-
development:
|
20
|
-
<<: *default
|
21
|
-
database: <%= app_name %>_development
|
22
|
-
|
23
|
-
# Warning: The database defined as "test" will be erased and
|
24
|
-
# re-generated from your development database when you run "rake".
|
25
|
-
# Do not set this db to the same as development or production.
|
26
|
-
test:
|
27
|
-
<<: *default
|
28
|
-
database: <%= app_name %>_test
|
29
|
-
|
30
|
-
# As with config/credentials.yml, you never want to store sensitive information,
|
31
|
-
# like your database password, in your source code. If your source code is
|
32
|
-
# ever seen by anyone, they now have access to your database.
|
33
|
-
#
|
34
|
-
# Instead, provide the password or a full connection URL as an environment
|
35
|
-
# variable when you boot the app. For example:
|
36
|
-
#
|
37
|
-
# DATABASE_URL="mysql://myuser:mypass@localhost/somedatabase"
|
38
|
-
#
|
39
|
-
# If the connection URL is provided in the special DATABASE_URL environment
|
40
|
-
# variable, Rails will automatically merge its configuration values on top of
|
41
|
-
# the values provided in this file. Alternatively, you can specify a connection
|
42
|
-
# URL environment variable explicitly:
|
43
|
-
#
|
44
|
-
# production:
|
45
|
-
# url: <%%= ENV["MY_APP_DATABASE_URL"] %>
|
46
|
-
#
|
47
|
-
# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
|
48
|
-
# for a full overview on how database connection configuration can be specified.
|
49
|
-
#
|
50
|
-
production:
|
51
|
-
<<: *default
|
52
|
-
database: <%= app_name %>_production
|
53
|
-
username: <%= app_name %>
|
54
|
-
password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
|
@@ -1,70 +0,0 @@
|
|
1
|
-
# PostgreSQL. Versions 9.3 and up are supported.
|
2
|
-
#
|
3
|
-
# Configure Using Gemfile
|
4
|
-
# gem "activerecord-jdbcpostgresql-adapter"
|
5
|
-
#
|
6
|
-
default: &default
|
7
|
-
adapter: postgresql
|
8
|
-
encoding: unicode
|
9
|
-
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
|
-
|
11
|
-
development:
|
12
|
-
<<: *default
|
13
|
-
database: <%= app_name %>_development
|
14
|
-
|
15
|
-
# The specified database role being used to connect to PostgreSQL.
|
16
|
-
# To create additional roles in PostgreSQL see `$ createuser --help`.
|
17
|
-
# When left blank, PostgreSQL will use the default role. This is
|
18
|
-
# the same name as the operating system user running Rails.
|
19
|
-
#username: <%= app_name %>
|
20
|
-
|
21
|
-
# The password associated with the PostgreSQL role (username).
|
22
|
-
#password:
|
23
|
-
|
24
|
-
# Connect on a TCP socket. Omitted by default since the client uses a
|
25
|
-
# domain socket that doesn't need configuration. Windows does not have
|
26
|
-
# domain sockets, so uncomment these lines.
|
27
|
-
#host: localhost
|
28
|
-
#port: 5432
|
29
|
-
|
30
|
-
# Schema search path. The server defaults to $user,public
|
31
|
-
#schema_search_path: myapp,sharedapp,public
|
32
|
-
|
33
|
-
# Minimum log levels, in increasing order:
|
34
|
-
# debug5, debug4, debug3, debug2, debug1,
|
35
|
-
# log, notice, warning, error, fatal, and panic
|
36
|
-
# Defaults to warning.
|
37
|
-
#min_messages: notice
|
38
|
-
|
39
|
-
# Warning: The database defined as "test" will be erased and
|
40
|
-
# re-generated from your development database when you run "rake".
|
41
|
-
# Do not set this db to the same as development or production.
|
42
|
-
test:
|
43
|
-
<<: *default
|
44
|
-
database: <%= app_name %>_test
|
45
|
-
|
46
|
-
# As with config/credentials.yml, you never want to store sensitive information,
|
47
|
-
# like your database password, in your source code. If your source code is
|
48
|
-
# ever seen by anyone, they now have access to your database.
|
49
|
-
#
|
50
|
-
# Instead, provide the password or a full connection URL as an environment
|
51
|
-
# variable when you boot the app. For example:
|
52
|
-
#
|
53
|
-
# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
|
54
|
-
#
|
55
|
-
# If the connection URL is provided in the special DATABASE_URL environment
|
56
|
-
# variable, Rails will automatically merge its configuration values on top of
|
57
|
-
# the values provided in this file. Alternatively, you can specify a connection
|
58
|
-
# URL environment variable explicitly:
|
59
|
-
#
|
60
|
-
# production:
|
61
|
-
# url: <%%= ENV["MY_APP_DATABASE_URL"] %>
|
62
|
-
#
|
63
|
-
# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
|
64
|
-
# for a full overview on how database connection configuration can be specified.
|
65
|
-
#
|
66
|
-
production:
|
67
|
-
<<: *default
|
68
|
-
database: <%= app_name %>_production
|
69
|
-
username: <%= app_name %>
|
70
|
-
password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# SQLite. Versions 3.8.0 and up are supported.
|
2
|
-
# gem "activerecord-jdbcsqlite3-adapter"
|
3
|
-
#
|
4
|
-
# Configure Using Gemfile
|
5
|
-
# gem "activerecord-jdbcsqlite3-adapter"
|
6
|
-
#
|
7
|
-
default: &default
|
8
|
-
adapter: sqlite3
|
9
|
-
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
|
-
|
11
|
-
development:
|
12
|
-
<<: *default
|
13
|
-
database: storage/development.sqlite3
|
14
|
-
|
15
|
-
# Warning: The database defined as "test" will be erased and
|
16
|
-
# re-generated from your development database when you run "rake".
|
17
|
-
# Do not set this db to the same as development or production.
|
18
|
-
test:
|
19
|
-
<<: *default
|
20
|
-
database: storage/test.sqlite3
|
21
|
-
|
22
|
-
production:
|
23
|
-
<<: *default
|
24
|
-
database: storage/production.sqlite3
|