Commit Graph

90761 Commits

Author SHA1 Message Date
fatkodima
7c6b1f5de1
Merge pull request #50933 from 1060ki/update_docs_for_mysql_algorithm
[ci skip] [docs] Updated docs to indicate that mysql supports the algorithm
2024-02-02 12:02:52 +02:00
Tomoki Ichikawa
e07aecca93
[ci skip] [docs] Updated docs to indicate that mysql supports the algorithm 2024-02-02 10:38:18 +09:00
Yasuo Honda
1c2529b9a6
Merge pull request #50940 from skipkayhil/hm-use-as-test-case
Use ActiveSupport::TestCase for Tracker tests
2024-02-02 08:39:02 +09:00
Gannon McGibbon
3d887b4667
Merge pull request #50942 from andrewn617/better-rails-inspector-message
Improve the output of RailsInspect::Cli
2024-02-01 17:15:01 -06:00
Andrew Novoselac
010600d3fe Improve the output of RailsInspect::Cli
Give the developer some direction on how to resolve the error so they don't need to read the code to figure it out.
2024-02-01 17:57:35 -05:00
cjilbert504
9d0a913763
Deprecate passing nil as model arg instead of raising ArgumentError (#50931) 2024-02-01 13:23:03 -08:00
Hartley McGuire
3a3ef7c1ed
Use ActiveSupport::TestCase for Tracker tests
Minitest::Test does not support all of the same options as
ActiveSupport::TestCase, such as running bin/test <filename>:<lineno>
and -n /regex/. Trying to use these options on this file would just run
all of the Minitest::Tests no matter what options were passed.

This commit fixes the ability to use those options by using
ActiveSupport::TestCase (like every other test in the repo).

Before:

```
$ bin/test test/template/dependency_tracker_test.rb:217
Running 59 tests in parallel using 8 processes
Run options: --seed 42725

.........................................................

Finished in 0.322759s, 176.6024 runs/s, 176.6024 assertions/s.
57 runs, 57 assertions, 0 failures, 0 errors, 0 skips
```

After:

```
$ bin/test test/template/dependency_tracker_test.rb:217
Running 59 tests in parallel using 8 processes
Run options: --seed 15213

...

Finished in 0.359162s, 8.3528 runs/s, 8.3528 assertions/s.
3 runs, 3 assertions, 0 failures, 0 errors, 0 skips
```
2024-02-01 15:45:00 -05:00
Carlos Antonio da Silva
e09e61af0d
Merge pull request #50936 from sato11/query-constraints-typo
Correct error in the document for `query_constraints` [ci-skip]
2024-02-01 13:44:43 -03:00
Junichi Sato
4dc86683a4
Correct error in the document for query_constraints [ci-skip]
The context of this example suggests what it really wants to
point to is `query_constraints` instead of `query_by`.

Also apply fixed-width font to the reference to the methods correctly.
2024-02-01 20:27:55 +09:00
Jean Boussier
c0be0a2534
Merge pull request #50934 from Shopify/refactor-query-cache-tests
Refactor QueryCacheTest
2024-02-01 11:22:57 +01:00
Jean Boussier
6e2c2dbb7d Refactor QueryCacheTest
In preparation of an upcoming query cache refactor.

The main changes is to not test the clear caused by `cached { }`
and what's inside the block.
2024-02-01 11:07:22 +01:00
Yasuo Honda
4332988337
Merge pull request #50929 from railsbob/video-analyzer-nightly-test-failure
Fix VideoAnalyzerTest#test_analyzing_a_rotated_HDR_video failure with ffmpeg < 5.0
2024-02-01 11:59:20 +09:00
Anup Narkhede
3d7b52176d Fix VideoAnalyzerTest#test_analyzing_a_rotated_HDR_video failure with ffmpeg < 5.0
The VideoAnalyzer uses ffprobe (part of ffmpeg) to determine the
rotation of a video. The VideoAnalyzer#angle returns tags["rotate"] if
it is available, else it attempts to get "rotation" from the Display
Matrix side_data.

However, ffprobe exhibits different behavior with different versions:
ffprobe version 4.4.2-0ubuntu on Ubuntu 22.04 returns a "rotate" : "90"
tag.

In contrast, ffprobe version 6.0-6ubuntu1 on Ubuntu 23.10 does not
return the "rotate" tag; instead, it determines the angle from the
display matrix side_data, which returns "rotation": -90.

To account for this difference, we now check for both values in the test.
2024-01-31 22:58:52 +00:00
Jean Boussier
7c1db8db9e Always call preload_app! in Puma config
The puma documentation and code seem to disagree about
whether `preload_app!` is the default depending on the number
of workers.

Worst case it's the default and making it explicit is no big deal.
2024-01-31 21:45:12 +01:00
Jean Boussier
774c630068
Merge pull request #50926 from Shopify/gm/namespace-module-when-delegation-obj-is-module
Add `::` to namespace the module we delegate "to"
2024-01-31 12:28:02 +01:00
George Ma
3711c69ab0 Add :: to namespace the module we delegate "to"
Only namespace when the delegation object is a module
2024-01-31 11:35:15 +01:00
Rafael Mendonça França
b16b5168af
Merge pull request #50922 from fatkodima/fix-loading-schema-cache-database_tasks-false
Fix loading schema cache when all databases have disabled database tasks
2024-01-30 19:19:54 -05:00
Tristan Starck
b0b481a7c4
Fix teardown callbacks (#50915)
* Switch ActiveSupport::TestCase teardown and setup callbacks to run in setup and teardown minitest lifecycle hooks.

Minitest provides `setup` and `teardown` lifecycle hooks to run code in. In general it is best practice to when defining your own test case class, to use `Minitest::TestCase.setup` and `Minitest::TestCase.teardown` instead of `before_setup` and `after_teardown`.

Per Minitest's Documentation on Lifecycle Hooks: https://docs.ruby-lang.org/en/2.1.0/MiniTest/Unit/LifecycleHooks.html
> before_setup()
> Runs before every test, before setup. This hook is meant for libraries to extend minitest. It is not meant to be used by test developers.

> after_teardown()
> Runs after every test, after teardown. This hook is meant for libraries to extend minitest. It is not meant to be used by test developers.

Since the `setup` and `teardown` ActiveSupport::TestCase callbacks are in essence user code, it makes sense to run during their corresponding Minitest Lifecycle hooks.

* Ensure test fixutres are torndown on errors in superclass after_teardown code.

By not adding wrapping the `teardown_fixtures` code, its possible that super raises an error and prevents the existing database transaction from rolling back.
`super` in general should only be calling `Minitest::Testcase.after_teardown` however, if another library were to override `Minitest::Testcase.after_teardown`, like the popular gem [rspec-mocks](https://github.com/rspec/rspec-mocks/blob/main/lib/rspec/mocks/minitest_integration.rb#L23) does, it causes all subsequent tests to retain any changes that were made to the database in the original test that errors.

* Remove unnecessary setup and teardown methods in tests

* update activesupport Changelog

* Fix linter issues in CHANGELOG

* fix tests with improper setup and teardown method definitions

* Fix final CHANGELOG lint

* Revert "Fix final CHANGELOG lint"

This reverts commit f30682eb629780862ccc63e1d3210dfe035e997e.

* Revert "fix tests with improper setup and teardown method definitions"

This reverts commit 1d5b88c8739695a4eed5c46924c9ffc6010353f5.

* Revert "Fix linter issues in CHANGELOG"

This reverts commit 60e89bd189cbcdf50d7e923a90ec5ebe1578a6e9.

* Revert "update activesupport Changelog"

This reverts commit 0f19bc324fec7a793cc34dcfede27017b5a24e46.

* Revert "Remove unnecessary setup and teardown methods in tests"

This reverts commit e5673f179ac01c814ab44017b97e7638aad6e775.

* Revert "Switch ActiveSupport::TestCase teardown and setup callbacks to run in setup and teardown minitest lifecycle hooks."

This reverts commit d08d92d86131d8643a275397d9b0c15995730a14.

* Rescue Minitest::Assertion errors in ActiveSupport::TestCase.teardown callback code to ensure all other after_teardown methods are called.

* Fix name of test class

* remove unused MyError class

* Fix module to not be in global namespace

Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
2024-01-30 19:05:18 -05:00
Rafael Mendonça França
316338acf7
Merge pull request #50921 from yahonda/rubygems_7386
Require 'uri' explicitly to address `NameError: uninitialized constant ToQueryTest::URI`
2024-01-30 13:48:58 -05:00
Carlos Antonio da Silva
979c6b0366 Fix broken anchor in Rails Guides Guidelines
Use american english word as per the guidelines
[ci skip]
2024-01-30 11:01:56 -03:00
Jean Boussier
c900558f48
Merge pull request #50923 from Shopify/core-silencer
BacktraceCleaner silence core internal methods by default
2024-01-30 13:42:24 +01:00
Jean Boussier
794016aad7 BacktraceCleaner silence core internal methods by default
In recent Ruby versions some pure C functions have been moved into
some semi-ruby code and now have an `<internal:something>` location.

They should be silenced like stdlib etc.
2024-01-30 13:24:50 +01:00
Jean Boussier
eb6e53c291
Merge pull request #50918 from Shopify/improve-kernel-inspect
More efficiently reset inspect implementation
2024-01-30 13:21:56 +01:00
fatkodima
b8585b3b3a Fix loading schema cache when all databases have disabled database tasks 2024-01-30 13:49:05 +02:00
Yasuo Honda
33c6f0f723 Require 'uri' explicitly to address NameError: uninitialized constant ToQueryTest::URI
This commit addresses CI failure
at https://buildkite.com/rails/rails-nightly/builds/108#018d57ac-4f2a-45f1-86b9-9015a7b0a463/1165-2002

* Error addressed by this commit
```
$ ruby -v
ruby 3.4.0dev (2024-01-30T10:19:23Z master 86547fd69d) [x86_64-linux]
$ rm Gemfile.lock
$ bundle install
$ cd activesupport
$ bin/test test/core_ext/object/to_query_test.rb -n test_hash_not_sorted_lexicographically_for_nested_structure
... snip ...

E

Error:
ToQueryTest#test_hash_not_sorted_lexicographically_for_nested_structure:
NameError: uninitialized constant ToQueryTest::URI
    test/core_ext/object/to_query_test.rb:90:in `test_hash_not_sorted_lexicographically_for_nested_structure'

bin/test test/core_ext/object/to_query_test.rb:79

Finished in 0.000385s, 2597.3082 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
$
```

This behavior has been introduced since Ruby 3.4.0dev vendors URI from top level to `Gem::URI`
via d64d0b5423 .
Here is the RubyGems one.
https://github.com/rubygems/rubygems/pull/7386
2024-01-30 20:29:33 +09:00
Petrik de Heus
1cb5b8d5a9
Merge pull request #50881 from D-system/doc-no-extension-in-filename-render
Update caching_with_rails.md regarding extension in filename [ci skip]
2024-01-30 10:17:39 +01:00
Jean Boussier
ad81c30859 More efficiently reset inspect implementation
Not that `inspect` is anywhere close to be a hostspot, but just
to not allow a less defficient pattern.

Instead of allocating an UnboundMethod and bind_call it, we can
directly replace the method.
2024-01-30 08:34:22 +01:00
Thomas Brennetot
db3d29442c Doc: update partial rendering with dots in name
Since #39164 extension are deprecated (shipped with Rails 6.1).
And has been removed in Rails 7.0.
2024-01-30 09:32:41 +09:00
Yutaka Kamei
329582353c
Add ".[key]" to the abstract namespaces [ci skip] (#50860)
* Add ".[key]" to the abstract namespaces [ci skip]

The section "Error Message Scopes" describes how the Rails look up the
namespaces for a validation error message with code snippets.
The first code snippet shows abstract namespaces like
`errors.attributes.[attribute_name]` while the second one demonstrates
the materialized one like `errors.attributes.name.blank`.
The first code snippet lacks the validation error "key." My team member
was confused and created a translation without "key", so I think it
would be helpful to add ".[key]" to the abstract namespaces.

* Move abstract key list after :blank examples

Co-authored-by: Rafael Mendonça França <rafael@rubyonrails.org>
2024-01-29 17:45:55 -05:00
Rafael Mendonça França
00ca9f5e72
Merge pull request #50876 from djmb/ar-encryption-disable-compression
Allow encryption without compression
2024-01-29 14:19:41 -05:00
Donal McBreen
8c3d4f2b24
Allow encryption without compression
Add a `compress` option to ActiveRecord::Encryption::Encryptor, which
defaults to `true`. When set to `false`, the encryptor will never
compress the data.

This is useful for cases where the data is already compressed.

This can be used with the `encryptor` option in the model:

```ruby
class Record < ApplicationRecord
  encrypts :field, encryptor: ActiveRecord::Encryption::Encryptor.new(compress: false)
end
```
2024-01-29 18:50:46 +00:00
Rafael Mendonça França
12343bdc53
Merge pull request #50893 from rails/rm-fix-schema-cache-multiple-configs
Unify the logic to determine the default schema cache path for a database configuration
2024-01-29 13:36:47 -05:00
Rafael Mendonça França
de645c6794
Change HashConfig documentation to be markdown 2024-01-29 18:18:16 +00:00
Rafael Mendonça França
4d1d7d3d1b
Unify the logic to determine the default schema cache path for a database configuration
When the application has more than one database configuration, only
the primary was being loaded by default on boot time. All the other
connection pools were loading the schema cache lazily.

This logic can be found in:

351a8d9bc9/activerecord/lib/active_record/connection_adapters/pool_config.rb (L13)
351a8d9bc9/activerecord/lib/active_record/railtie.rb (L149-L178)

The lazy code path wasn't using the same logic to determine the name
of the default schema cache file that the Railties uses, so it
was loading the schema cache of the primary config to all the other
configs. If no table name coincided nothing bad would happen, but if
table names coincided, the schema would be completly wrong in all
non-primary connections.
2024-01-29 18:18:15 +00:00
Rafael Mendonça França
1cf7025b4d
Allow passing a DatabaseConfig object to cache_dump_filename 2024-01-29 18:18:13 +00:00
Rafael Mendonça França
e3efad939d
Fix documentation for DatabaseConfigurations::HashConfig#initialize 2024-01-29 18:18:00 +00:00
Rafael Mendonça França
fac3f20705
Merge pull request #50904 from williantenfen/support-comments-on-railsrc-file
Commented out lines in .railsrc file should not be treated as arguments
2024-01-29 13:17:29 -05:00
Rafael Mendonça França
e7073e4c95
Merge pull request #50887 from marvin-bitterlich/marvin.bitterlich/result-set
Add row_count field to sql.active_record notification
2024-01-29 13:02:16 -05:00
Willian Tenfen W
35f132e7ee
Support comment symbol '#' on .railsrc file
Commented out lines in .rc file should not be treated as arguments when
using rails new generator command. [Fix #50899]
2024-01-29 17:56:24 +00:00
Rafael Mendonça França
5606783097
Merge pull request #50903 from skipkayhil/hm-exact-generator-assertions
Change skeleton test to assert exact file output
2024-01-29 12:54:38 -05:00
Rafael Mendonça França
44e2bc2599
Merge pull request #50907 from ruyrocha/fix/skip-css-on-apis
Skip CSS when creating APIs.
2024-01-29 12:37:18 -05:00
Rafael Mendonça França
6b9601029b
Merge pull request #50911 from yahonda/use_httpclient_master_for_ruby34
Use `httpclient` to run "Daily build with Ruby head"
2024-01-29 12:32:06 -05:00
Eileen M. Uchitelle
660f77c230
Merge pull request #50912 from Shopify/drop-stolen-data-prices-from-security-docs
Remove stolen data prices from the security guide
2024-01-29 10:01:06 -05:00
Nikita Vasilevsky
574f54b465
Remove stolen data prices from the security guide 2024-01-29 13:19:23 +00:00
Yasuo Honda
baae73c074 Use httpclient to run "Daily build with Ruby head"
This pull request addresses "Daily build with Ruby head" failure https://buildkite.com/rails/rails-nightly/builds/101#018d5285-b4de-4072-b7d3-61c19f21347a

Action Mailbox needs `webmock` which depends on `httpclient`.
`httpclient` master branch that added `mutex_m` as a dependency via https://github.com/nahi/httpclient/pull/455 to support Ruby 3.4.0dev.

```ruby
cd actionmailbox
bundle exec rake test
```

```ruby
... snip ...
/home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/webmock-3.19.1/lib/webmock/http_lib_adapters/httpclient_adapter.rb:234:in `alias_method': undefined method `do_get_block' for class `WebMockHTTPClient' (NameError)

    alias_method :do_get_block_without_webmock, :do_get_block
    ^^^^^^^^^^^^
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/webmock-3.19.1/lib/webmock/http_lib_adapters/httpclient_adapter.rb:234:in `<class:WebMockHTTPClient>'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/webmock-3.19.1/lib/webmock/http_lib_adapters/httpclient_adapter.rb:233:in `<top (required)>'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/webmock-3.19.1/lib/webmock.rb:52:in `require_relative'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/webmock-3.19.1/lib/webmock.rb:52:in `<top (required)>'
        from <internal:/home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundler/runtime.rb:60:in `block (2 levels) in require'
        from <internal:array>:52:in `each'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundler/runtime.rb:55:in `block in require'
        from <internal:array>:52:in `each'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundler/runtime.rb:44:in `require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundler.rb:187:in `require'
        from /home/yahonda/src/github.com/rails/rails/actionmailbox/test/dummy/config/application.rb:7:in `<top (required)>'
        from /home/yahonda/src/github.com/rails/rails/actionmailbox/test/dummy/config/environment.rb:2:in `require_relative'
        from /home/yahonda/src/github.com/rails/rails/actionmailbox/test/dummy/config/environment.rb:2:in `<top (required)>'
        from /home/yahonda/src/github.com/rails/rails/actionmailbox/test/test_helper.rb:8:in `require_relative'
        from /home/yahonda/src/github.com/rails/rails/actionmailbox/test/test_helper.rb:8:in `<top (required)>'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundled_gems.rb:74:in `require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
        from /home/yahonda/src/github.com/rails/rails/actionmailbox/test/controllers/ingresses/mailgun/inbound_emails_controller_test.rb:3:in `<top (required)>'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundled_gems.rb:74:in `require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/3.4.0+0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:21:in `block in <main>'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:6:in `select'
        from /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:6:in `<main>'
rake aborted!
Command failed with status (1): [ruby -w -I"lib:test" /home/yahonda/.rbenv/versions/ruby-dev/lib/ruby/gems/3.4.0+0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb "test/controllers/ingresses/mailgun/inbound_emails_controller_test.rb" "test/controllers/ingresses/mandrill/inbound_emails_controller_test.rb" "test/controllers/ingresses/postmark/inbound_emails_controller_test.rb" "test/controllers/ingresses/relay/inbound_emails_controller_test.rb" "test/controllers/ingresses/sendgrid/inbound_emails_controller_test.rb" "test/controllers/rails/action_mailbox/inbound_emails_controller_test.rb" "test/generators/mailbox_generator_test.rb" "test/jobs/incineration_job_test.rb" "test/migrations_test.rb" "test/models/table_name_test.rb" "test/unit/inbound_email/incineration_test.rb" "test/unit/inbound_email/message_id_test.rb" "test/unit/inbound_email_test.rb" "test/unit/mail_ext/address_equality_test.rb" "test/unit/mail_ext/address_wrapping_test.rb" "test/unit/mail_ext/addresses_test.rb" "test/unit/mailbox/bouncing_test.rb" "test/unit/mailbox/callbacks_test.rb" "test/unit/mailbox/notifications_test.rb" "test/unit/mailbox/routing_test.rb" "test/unit/mailbox/state_test.rb" "test/unit/relayer_test.rb" "test/unit/router_test.rb" "test/unit/test_helper_test.rb" ]
<internal:array>:52:in `each'
<internal:array>:52:in `each'
/home/yahonda/.rbenv/versions/ruby-dev/bin/bundle:25:in `load'
/home/yahonda/.rbenv/versions/ruby-dev/bin/bundle:25:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
$
```
2024-01-29 21:37:10 +09:00
Ruy R.
4ddf6ccad0
Skip CSS when creating APIs.
Update CHANGELOG.

Address requested changes.
2024-01-29 06:42:01 -03:00
Hartley McGuire
c278684ae1
Assert exact file output for plugins too
In a [previous commit][1], the App Generator skeleton test was updated
to verify the exact file output when generating a new application. This
commit applies the same change to the Plugin Generator.

At first, I was hesitant to add the list of dummy app files to the
`default_files` for the Plugin Generator test, however it quickly became
apparent that it was a good idea. Making this change exposed that recent
file additions to the App Generator were added to the plugin's dummy app
as well. Things like CI files, rubocop configuration, and a brakeman
command should not be created for a dummy app, and are now properly
excluded.

Similar to the App Generator commit, this change also removes tests that
are now redundant due to the skeleton test verifying the exact list of
files generated.

[1]: e5e4b801046bceb1067ffb316edd1ad704b6596d
2024-01-28 16:08:46 -05:00
Hartley McGuire
e5e4b80104
Change skeleton test to assert exact file output
Previously, the skeleton test would assert that every file in the
`default_files` list existed. However, since there is no requirement
that a file is added to this list when added to the generator the list
can (and has) become out of sync with the exact generated output.

This commit refactors the skeleton test to gather the full list of files
created by the generator so that it can be compared exactly to the list
of `default_files`. This ensures the generated file list must be updated
when any file is added or removed from the generator. Additionally, by
using array equality the sorting of the `default_files` list is enforced
(it was previously _mostly_ alphabetical, but not fully).

The new skeleton test assertion was written to only assert files instead
of folders for a few reasons:
- asserting that folders exist is redundant if a file exists within a
  folder (and the `default_files` list would be significantly longer
  with all folders)
- any folder generated without any files inside it will not be tracked
  by Git, so other code cannot assume these empty folders exist

Because of these reasons, this patch also includes a change to no longer
generate the `tmp/cache/assets` folder by default. The folder is an
implementation detail of Sprockets and doesn't need any special
treatment in Rails. The `Sprockets::Cache::FileStore` will create the
directory if it does not exist (which it usually won't since `tmp/cache`
is excluded from Git by the `.gitignore`), and the `tmp:cache:clear`
task already clears all subdirectories of `tmp/cache`.

Finally, some tests making assertions about the default output of the
app generator were removed as they have been made redundant by the
improvements to the skeleton test.
2024-01-28 15:03:56 -05:00
Xavier Noria
cf26c54829
Merge pull request #50902 from rails/docs/add_autoload_paths_to_load_path
Remove add_autoload_paths_to_load_path docs from autoloading guide
2024-01-28 19:16:27 +01:00
Xavier Noria
d823faa67b Remove add_autoload_paths_to_load_path docs from autoloading guide 2024-01-28 18:05:58 +01:00