railties 7.1.0 → 7.2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +203 -650
  3. data/lib/minitest/rails_plugin.rb +5 -2
  4. data/lib/rails/all.rb +1 -3
  5. data/lib/rails/api/task.rb +6 -4
  6. data/lib/rails/application/bootstrap.rb +11 -8
  7. data/lib/rails/application/configuration.rb +80 -36
  8. data/lib/rails/application/dummy_config.rb +2 -2
  9. data/lib/rails/application/finisher.rb +10 -0
  10. data/lib/rails/application.rb +29 -76
  11. data/lib/rails/backtrace_cleaner.rb +18 -3
  12. data/lib/rails/cli.rb +0 -1
  13. data/lib/rails/command.rb +1 -1
  14. data/lib/rails/commands/app/update_command.rb +102 -0
  15. data/lib/rails/commands/boot/boot_command.rb +14 -0
  16. data/lib/rails/commands/console/console_command.rb +2 -21
  17. data/lib/rails/commands/console/irb_console.rb +146 -0
  18. data/lib/rails/commands/credentials/USAGE +1 -1
  19. data/lib/rails/commands/credentials/credentials_command.rb +2 -2
  20. data/lib/rails/commands/dbconsole/dbconsole_command.rb +21 -30
  21. data/lib/rails/commands/devcontainer/devcontainer_command.rb +39 -0
  22. data/lib/rails/commands/rake/rake_command.rb +1 -1
  23. data/lib/rails/commands/runner/runner_command.rb +14 -3
  24. data/lib/rails/commands/server/server_command.rb +5 -3
  25. data/lib/rails/commands/test/test_command.rb +2 -0
  26. data/lib/rails/configuration.rb +10 -1
  27. data/lib/rails/console/app.rb +5 -32
  28. data/lib/rails/console/helpers.rb +5 -16
  29. data/lib/rails/console/methods.rb +23 -0
  30. data/lib/rails/engine/configuration.rb +45 -6
  31. data/lib/rails/engine.rb +24 -17
  32. data/lib/rails/gem_version.rb +3 -3
  33. data/lib/rails/generators/active_model.rb +26 -12
  34. data/lib/rails/generators/app_base.rb +80 -61
  35. data/lib/rails/generators/base.rb +9 -5
  36. data/lib/rails/generators/database.rb +227 -69
  37. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +2 -0
  38. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +2 -0
  39. data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +2 -0
  40. data/lib/rails/generators/generated_attribute.rb +26 -1
  41. data/lib/rails/generators/migration.rb +3 -3
  42. data/lib/rails/generators/rails/app/app_generator.rb +57 -32
  43. data/lib/rails/generators/rails/app/templates/Dockerfile.tt +23 -16
  44. data/lib/rails/generators/rails/app/templates/Gemfile.tt +17 -17
  45. data/lib/rails/generators/rails/app/templates/app/controllers/application_controller.rb.tt +4 -0
  46. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +8 -1
  47. data/lib/rails/generators/rails/app/templates/app/views/pwa/manifest.json.erb.tt +22 -0
  48. data/lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js +26 -0
  49. data/lib/rails/generators/rails/app/templates/bin/brakeman.tt +6 -0
  50. data/lib/rails/generators/rails/app/templates/bin/rubocop.tt +7 -0
  51. data/lib/rails/generators/rails/app/templates/bin/setup.tt +6 -2
  52. data/lib/rails/generators/rails/app/templates/config/application.rb.tt +1 -1
  53. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +3 -3
  54. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +11 -4
  55. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +8 -1
  56. data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +3 -3
  57. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +14 -7
  58. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +14 -6
  59. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +10 -7
  60. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +1 -1
  61. data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -3
  62. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_2.rb.tt +70 -0
  63. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +25 -26
  64. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +6 -0
  65. data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +5 -0
  66. data/lib/rails/generators/rails/app/templates/dockerignore.tt +13 -0
  67. data/lib/rails/generators/rails/app/templates/github/ci.yml.tt +138 -0
  68. data/lib/rails/generators/rails/app/templates/github/dependabot.yml +12 -0
  69. data/lib/rails/generators/rails/app/templates/gitignore.tt +3 -3
  70. data/lib/rails/generators/rails/app/templates/public/406-unsupported-browser.html +66 -0
  71. data/lib/rails/generators/rails/app/templates/public/icon.png +0 -0
  72. data/lib/rails/generators/rails/app/templates/public/icon.svg +3 -0
  73. data/lib/rails/generators/rails/app/templates/rubocop.yml.tt +8 -0
  74. data/lib/rails/generators/rails/app/templates/test/application_system_test_case.rb.tt +1 -1
  75. data/lib/rails/generators/rails/controller/controller_generator.rb +1 -1
  76. data/lib/rails/generators/rails/db/system/change/change_generator.rb +134 -20
  77. data/lib/rails/generators/rails/devcontainer/devcontainer_generator.rb +166 -0
  78. data/lib/rails/generators/rails/devcontainer/templates/devcontainer/Dockerfile.tt +3 -0
  79. data/lib/rails/generators/rails/devcontainer/templates/devcontainer/compose.yaml.tt +47 -0
  80. data/lib/rails/generators/rails/devcontainer/templates/devcontainer/devcontainer.json.tt +37 -0
  81. data/lib/rails/generators/rails/migration/migration_generator.rb +4 -0
  82. data/lib/rails/generators/rails/plugin/plugin_generator.rb +40 -7
  83. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +2 -2
  84. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +5 -1
  85. data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +2 -0
  86. data/lib/rails/generators/rails/plugin/templates/bin/rubocop.tt +7 -0
  87. data/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +103 -0
  88. data/lib/rails/generators/rails/plugin/templates/github/dependabot.yml +12 -0
  89. data/lib/rails/generators/rails/plugin/templates/rubocop.yml.tt +8 -0
  90. data/lib/rails/generators/rails/plugin/templates/test/application_system_test_case.rb.tt +1 -1
  91. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +2 -2
  92. data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb.tt +6 -4
  93. data/lib/rails/generators/test_unit/mailer/templates/preview.rb.tt +3 -2
  94. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +15 -1
  95. data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +2 -2
  96. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +2 -2
  97. data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +2 -0
  98. data/lib/rails/generators/test_unit/system/templates/application_system_test_case.rb.tt +1 -1
  99. data/lib/rails/generators/testing/assertions.rb +20 -0
  100. data/lib/rails/generators/testing/behavior.rb +7 -6
  101. data/lib/rails/generators.rb +7 -3
  102. data/lib/rails/health_controller.rb +2 -2
  103. data/lib/rails/info.rb +2 -2
  104. data/lib/rails/info_controller.rb +4 -2
  105. data/lib/rails/mailers_controller.rb +14 -1
  106. data/lib/rails/paths.rb +2 -2
  107. data/lib/rails/pwa_controller.rb +15 -0
  108. data/lib/rails/rack/logger.rb +15 -7
  109. data/lib/rails/railtie/configurable.rb +2 -2
  110. data/lib/rails/railtie.rb +15 -16
  111. data/lib/rails/tasks/framework.rake +0 -26
  112. data/lib/rails/tasks/tmp.rake +1 -1
  113. data/lib/rails/tasks/zeitwerk.rake +14 -34
  114. data/lib/rails/templates/layouts/application.html.erb +1 -1
  115. data/lib/rails/templates/rails/mailers/email.html.erb +20 -9
  116. data/lib/rails/templates/rails/welcome/index.html.erb +4 -2
  117. data/lib/rails/test_help.rb +2 -4
  118. data/lib/rails/test_unit/reporter.rb +8 -2
  119. data/lib/rails/test_unit/runner.rb +26 -2
  120. data/lib/rails/test_unit/test_parser.rb +45 -0
  121. data/lib/rails/testing/maintain_test_schema.rb +1 -1
  122. data/lib/rails/zeitwerk_checker.rb +15 -0
  123. data/lib/rails.rb +7 -4
  124. metadata +46 -35
  125. data/lib/rails/app_updater.rb +0 -40
  126. data/lib/rails/commands/secrets/USAGE +0 -61
  127. data/lib/rails/commands/secrets/secrets_command.rb +0 -46
  128. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +0 -68
  129. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +0 -54
  130. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +0 -70
  131. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +0 -24
  132. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +0 -62
  133. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +0 -53
  134. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +0 -223
  135. data/lib/rails/generators/rails/app/templates/public/apple-touch-icon-precomposed.png +0 -0
  136. data/lib/rails/generators/rails/app/templates/public/apple-touch-icon.png +0 -0
  137. data/lib/rails/generators/rails/app/templates/public/favicon.ico +0 -0
  138. data/lib/rails/ruby_version_check.rb +0 -17
  139. data/lib/rails/secrets.rb +0 -110
@@ -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 postgres.
16
- # To create additional roles in postgres see `$ createuser --help`.
17
- # When left blank, postgres 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 postgres 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
@@ -1,62 +0,0 @@
1
- # Oracle/OCI 11g or higher recommended
2
- #
3
- # Requires Ruby/OCI8:
4
- # https://github.com/kubo/ruby-oci8
5
- #
6
- # Specify your database using any valid connection syntax, such as a
7
- # tnsnames.ora service name, or an SQL connect string of the form:
8
- #
9
- # //host:[port][/service name]
10
- #
11
- # By default prefetch_rows (OCI_ATTR_PREFETCH_ROWS) is set to 100. And
12
- # until true bind variables are supported, cursor_sharing is set by default
13
- # to 'similar'. Both can be changed in the configuration below; the defaults
14
- # are equivalent to specifying:
15
- #
16
- # prefetch_rows: 100
17
- # cursor_sharing: similar
18
- #
19
- default: &default
20
- adapter: oracle_enhanced
21
- pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
22
- username: <%= app_name %>
23
- password:
24
-
25
- development:
26
- <<: *default
27
- database: <%= app_name %>_development
28
-
29
- # Warning: The database defined as "test" will be erased and
30
- # re-generated from your development database when you run "rake".
31
- # Do not set this db to the same as development or production.
32
- test:
33
- <<: *default
34
- database: <%= app_name %>_test
35
-
36
- # As with config/credentials.yml, you never want to store sensitive information,
37
- # like your database password, in your source code. If your source code is
38
- # ever seen by anyone, they now have access to your database.
39
- #
40
- # Instead, provide the password or a full connection URL as an environment
41
- # variable when you boot the app. For example:
42
- #
43
- # DATABASE_URL="oracle-enhanced://myuser:mypass@localhost/somedatabase"
44
- #
45
- # (Note that the adapter name uses a dash instead of an underscore.)
46
- #
47
- # If the connection URL is provided in the special DATABASE_URL environment
48
- # variable, Rails will automatically merge its configuration values on top of
49
- # the values provided in this file. Alternatively, you can specify a connection
50
- # URL environment variable explicitly:
51
- #
52
- # production:
53
- # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
54
- #
55
- # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
56
- # for a full overview on how database connection configuration can be specified.
57
- #
58
- production:
59
- <<: *default
60
- database: <%= app_name %>_production
61
- username: <%= app_name %>
62
- password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -1,53 +0,0 @@
1
- # SQL Server (2012 or higher required)
2
- #
3
- # Install the adapters and driver
4
- # gem install tiny_tds
5
- # gem install activerecord-sqlserver-adapter
6
- #
7
- # Ensure the activerecord adapter and db driver gems are defined in your Gemfile
8
- # gem "tiny_tds"
9
- # gem "activerecord-sqlserver-adapter"
10
- #
11
- default: &default
12
- adapter: sqlserver
13
- encoding: utf8
14
- username: sa
15
- password: <%%= ENV["SA_PASSWORD"] %>
16
- host: localhost
17
-
18
- development:
19
- <<: *default
20
- database: <%= app_name %>_development
21
-
22
- # Warning: The database defined as "test" will be erased and
23
- # re-generated from your development database when you run "rake".
24
- # Do not set this db to the same as development or production.
25
- test:
26
- <<: *default
27
- database: <%= app_name %>_test
28
-
29
- # As with config/credentials.yml, you never want to store sensitive information,
30
- # like your database password, in your source code. If your source code is
31
- # ever seen by anyone, they now have access to your database.
32
- #
33
- # Instead, provide the password or a full connection URL as an environment
34
- # variable when you boot the app. For example:
35
- #
36
- # DATABASE_URL="sqlserver://myuser:mypass@localhost/somedatabase"
37
- #
38
- # If the connection URL is provided in the special DATABASE_URL environment
39
- # variable, Rails will automatically merge its configuration values on top of
40
- # the values provided in this file. Alternatively, you can specify a connection
41
- # URL environment variable explicitly:
42
- #
43
- # production:
44
- # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
45
- #
46
- # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
47
- # for a full overview on how database connection configuration can be specified.
48
- #
49
- production:
50
- <<: *default
51
- database: <%= app_name %>_production
52
- username: <%= app_name %>
53
- password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -1,223 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file eases your Rails 7.1 framework defaults upgrade.
4
- #
5
- # Uncomment each configuration one by one to switch to the new default.
6
- # Once your application is ready to run with all new defaults, you can remove
7
- # this file and set the `config.load_defaults` to `7.1`.
8
- #
9
- # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10
- # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11
-
12
- # No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able
13
- # to manually require files that are managed by the autoloader, which you shouldn't do anyway.
14
- # This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size
15
- # of the bootsnap cache if you use it.
16
- # Rails.application.config.add_autoload_paths_to_load_path = false
17
-
18
- # Remove the default X-Download-Options headers since it is used only by Internet Explorer.
19
- # If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`.
20
- # Rails.application.config.action_dispatch.default_headers = {
21
- # "X-Frame-Options" => "SAMEORIGIN",
22
- # "X-XSS-Protection" => "0",
23
- # "X-Content-Type-Options" => "nosniff",
24
- # "X-Permitted-Cross-Domain-Policies" => "none",
25
- # "Referrer-Policy" => "strict-origin-when-cross-origin"
26
- # }
27
-
28
- # Do not treat an `ActionController::Parameters` instance
29
- # as equal to an equivalent `Hash` by default.
30
- # Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false
31
-
32
- # Active Record Encryption now uses SHA-256 as its hash digest algorithm. Important: If you have
33
- # data encrypted with previous Rails versions, there are two scenarios to consider:
34
- #
35
- # 1. If you have +config.active_support.key_generator_hash_digest_class+ configured as SHA1 (the default
36
- # before Rails 7.0), you need to configure SHA-1 for Active Record Encryption too:
37
- # Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA1
38
- # 2. If you have +config.active_support.key_generator_hash_digest_class+ configured as SHA256 (the new default
39
- # in 7.0), then you need to configure SHA-256 for Active Record Encryption:
40
- # Rails.application.config.active_record.encryption.hash_digest_class = OpenSSL::Digest::SHA256
41
- #
42
- # If you don't currently have data encrypted with Active Record encryption, you can disable this setting to
43
- # configure the default behavior starting 7.1+:
44
- # Rails.application.config.active_record.encryption.support_sha1_for_non_deterministic_encryption = false
45
-
46
- # No longer run after_commit callbacks on the first of multiple Active Record
47
- # instances to save changes to the same database row within a transaction.
48
- # Instead, run these callbacks on the instance most likely to have internal
49
- # state which matches what was committed to the database, typically the last
50
- # instance to save.
51
- # Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false
52
-
53
- # Configures SQLite with a strict strings mode, which disables double-quoted string literals.
54
- #
55
- # SQLite has some quirks around double-quoted string literals.
56
- # It first tries to consider double-quoted strings as identifier names, but if they don't exist
57
- # it then considers them as string literals. Because of this, typos can silently go unnoticed.
58
- # For example, it is possible to create an index for a non existing column.
59
- # See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details.
60
- # Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true
61
-
62
- # Disable deprecated singular associations names
63
- # Rails.application.config.active_record.allow_deprecated_singular_associations_name = false
64
-
65
- # Enable the Active Job `BigDecimal` argument serializer, which guarantees
66
- # roundtripping. Without this serializer, some queue adapters may serialize
67
- # `BigDecimal` arguments as simple (non-roundtrippable) strings.
68
- #
69
- # When deploying an application with multiple replicas, old (pre-Rails 7.1)
70
- # replicas will not be able to deserialize `BigDecimal` arguments from this
71
- # serializer. Therefore, this setting should only be enabled after all replicas
72
- # have been successfully upgraded to Rails 7.1.
73
- # Rails.application.config.active_job.use_big_decimal_serializer = true
74
-
75
- # Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or
76
- # `write` are given an invalid `expires_at` or `expires_in` time.
77
- # Options are `true`, and `false`. If `false`, the exception will be reported
78
- # as `handled` and logged instead.
79
- # Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true
80
-
81
- # Specify whether Query Logs will format tags using the SQLCommenter format
82
- # (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format.
83
- # Options are `:legacy` and `:sqlcommenter`.
84
- # Rails.application.config.active_record.query_log_tags_format = :sqlcommenter
85
-
86
- # Specify the default serializer used by `MessageEncryptor` and `MessageVerifier`
87
- # instances.
88
- #
89
- # The legacy default is `:marshal`, which is a potential vector for
90
- # deserialization attacks in cases where a message signing secret has been
91
- # leaked.
92
- #
93
- # In Rails 7.1, the new default is `:json_allow_marshal` which serializes and
94
- # deserializes with `ActiveSupport::JSON`, but can fall back to deserializing
95
- # with `Marshal` so that legacy messages can still be read.
96
- #
97
- # In Rails 7.2, the default will become `:json` which serializes and
98
- # deserializes with `ActiveSupport::JSON` only.
99
- #
100
- # Alternatively, you can choose `:message_pack` or `:message_pack_allow_marshal`,
101
- # which serialize with `ActiveSupport::MessagePack`. `ActiveSupport::MessagePack`
102
- # can roundtrip some Ruby types that are not supported by JSON, and may provide
103
- # improved performance, but it requires the `msgpack` gem.
104
- #
105
- # For more information, see
106
- # https://guides.rubyonrails.org/v7.1/configuring.html#config-active-support-message-serializer
107
- #
108
- # If you are performing a rolling deploy of a Rails 7.1 upgrade, wherein servers
109
- # that have not yet been upgraded must be able to read messages from upgraded
110
- # servers, first deploy without changing the serializer, then set the serializer
111
- # in a subsequent deploy.
112
- # Rails.application.config.active_support.message_serializer = :json_allow_marshal
113
-
114
- # Enable a performance optimization that serializes message data and metadata
115
- # together. This changes the message format, so messages serialized this way
116
- # cannot be read by older versions of Rails. However, messages that use the old
117
- # format can still be read, regardless of whether this optimization is enabled.
118
- #
119
- # To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
120
- # not yet been upgraded must be able to read messages from upgraded servers,
121
- # leave this optimization off on the first deploy, then enable it on a
122
- # subsequent deploy.
123
- # Rails.application.config.active_support.use_message_serializer_for_metadata = true
124
-
125
- # Set the maximum size for Rails log files.
126
- #
127
- # `config.load_defaults 7.1` does not set this value for environments other than
128
- # development and test.
129
- #
130
- # if Rails.env.local?
131
- # Rails.application.config.log_file_size = 100 * 1024 * 1024
132
- # end
133
-
134
- # Enable raising on assignment to attr_readonly attributes. The previous
135
- # behavior would allow assignment but silently not persist changes to the
136
- # database.
137
- # Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true
138
-
139
- # Enable validating only parent-related columns for presence when the parent is mandatory.
140
- # The previous behavior was to validate the presence of the parent record, which performed an extra query
141
- # to get the parent every time the child record was updated, even when parent has not changed.
142
- # Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false
143
-
144
- # Enable precompilation of `config.filter_parameters`. Precompilation can
145
- # improve filtering performance, depending on the quantity and types of filters.
146
- # Rails.application.config.precompile_filter_parameters = true
147
-
148
- # Enable before_committed! callbacks on all enrolled records in a transaction.
149
- # The previous behavior was to only run the callbacks on the first copy of a record
150
- # if there were multiple copies of the same record enrolled in the transaction.
151
- # Rails.application.config.active_record.before_committed_on_all_records = true
152
-
153
- # Disable automatic column serialization into YAML.
154
- # To keep the historic behavior, you can set it to `YAML`, however it is
155
- # recommended to explicitly define the serialization method for each column
156
- # rather than to rely on a global default.
157
- # Rails.application.config.active_record.default_column_serializer = nil
158
-
159
- # Enable a performance optimization that serializes Active Record models
160
- # in a faster and more compact way.
161
- #
162
- # To perform a rolling deploy of a Rails 7.1 upgrade, wherein servers that have
163
- # not yet been upgraded must be able to read caches from upgraded servers,
164
- # leave this optimization off on the first deploy, then enable it on a
165
- # subsequent deploy.
166
- # Rails.application.config.active_record.marshalling_format_version = 7.1
167
-
168
- # Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model.
169
- # This matches the behaviour of all other callbacks.
170
- # In previous versions of Rails, they ran in the inverse order.
171
- # Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true
172
-
173
- # Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
174
- #
175
- # Rails.application.config.active_record.commit_transaction_on_non_local_return = true
176
-
177
- # Controls when to generate a value for <tt>has_secure_token</tt> declarations.
178
- #
179
- # Rails.application.config.active_record.generate_secure_token_on = :initialize
180
-
181
- # ** Please read carefully, this must be configured in config/application.rb **
182
- # Change the format of the cache entry.
183
- # Changing this default means that all new cache entries added to the cache
184
- # will have a different format that is not supported by Rails 7.0
185
- # applications.
186
- # Only change this value after your application is fully deployed to Rails 7.1
187
- # and you have no plans to rollback.
188
- # When you're ready to change format, add this to `config/application.rb` (NOT
189
- # this file):
190
- # config.active_support.cache_format_version = 7.1
191
-
192
- # Configure Action View to use HTML5 standards-compliant sanitizers when they are supported on your
193
- # platform.
194
- #
195
- # `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action View to use HTML5-compliant
196
- # sanitizers if they are supported, else fall back to HTML4 sanitizers.
197
- #
198
- # In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor.
199
- #
200
- # Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
201
-
202
- # Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
203
- # platform.
204
- #
205
- # `Rails::HTML::Sanitizer.best_supported_vendor` will cause Action Text to use HTML5-compliant
206
- # sanitizers if they are supported, else fall back to HTML4 sanitizers.
207
- #
208
- # In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor.
209
- #
210
- # Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor
211
-
212
- # Configure the log level used by the DebugExceptions middleware when logging
213
- # uncaught exceptions during requests
214
- # Rails.application.config.action_dispatch.debug_exception_log_level = :error
215
-
216
- # Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
217
- # parsers.
218
- #
219
- # Nokogiri::HTML5 isn't supported on JRuby, so JRuby applications must set this to :html4.
220
- #
221
- # In previous versions of Rails, these test helpers always used an HTML4 parser.
222
- #
223
- # Rails.application.config.dom_testing_default_html_version = :html5
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # :stopdoc:
4
-
5
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7.0") && RUBY_ENGINE == "ruby"
6
- desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
7
- abort <<-end_message
8
-
9
- Rails 7 requires Ruby 2.7.0 or newer.
10
-
11
- You're running
12
- #{desc}
13
-
14
- Please upgrade to Ruby 2.7.0 or newer to continue.
15
-
16
- end_message
17
- end