| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Various fixes in ActiveSupport::Notifications::Event
|
| | |
|
| |
| |
| |
| | |
variables such as @cpu_time, @idle_time and @allocations; this reduces one allocation
|
| |
| |
| |
| | |
event subscribed by a `ActiveSupport::Notifications::Fanout::Subscribers::Timed` subscriber
|
| |
| |
| |
| | |
`ActiveSupport::Notifications::Fanout::Subscribers::Timed` subscriber
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
soartec-lab/update_guide_asset_pipeline_change_default
Guide updated in line with changes in rails commands [skip ci]
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Signed-off-by: Kasper Timm Hansen <kaspth@gmail.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`bin/setup` and `bin/update` are currently almost the same file. The
only thing that keeps them apart is that one is running `bin/rails
db:setup` and the other `bin/rails db:migrate`.
I'm suggesting here that they should be a unique script, which needs to
be idempotent.
- New to a project, need to get started? `bin/setup`
- Need to install new dependencies that were added recently? `bin/setup`.
Before deprecating `bin/update`, I'm suggesting we just have it call
`bin/setup`.
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
Signed-off-by: Kasper Timm Hansen <kaspth@gmail.com>
|
|\ \ \ \ \
| |/ / / /
|/| / / /
| |/ / / |
Signed-off-by: Kasper Timm Hansen <kaspth@gmail.com>
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Cache versioning enables the same cache key to be reused when the object
being cached changes by moving the volatile part of the cache key out of
the cache key and into a version that is embedded in the cache entry.
This is already occurring when the object being cached is an
`ActiveRecord::Base`, but when caching an `ActiveRecord::Relation`
we are currently still putting the volatile information (max updated at
and count) as part of the cache key.
This PR moves the volatile part of the relations `cache_key` into the
`cache_version` to support recycling cache keys for
`ActiveRecord::Relation`s.
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
tjoyal/Rails/MailersController/do-not-leak-I18n-global-setting-changes
[Rails::MailersController] Do not leak I18n global setting changes
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Squash warning: possibly useless use of a constant in void context
|
|/ / /
| | |
| | |
| | | |
in void context
|
|\ \ \
| | | |
| | | | |
Update the generate command sample codes [skip ci]
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Cache full MySQL version in schema cache
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Remove AbstractMysqlAdapter::Version since full_version_string will always
be set.
* Remove nodoc on private methods because private methods are not exposed in
the docs.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* The database version is cached in all the adapters, but this didn't include
the full MySQL version. Anything that uses the full MySQL version would need
to query the database to get that data even if they're using the schema
cache.
* Now the full MySQL version will be cached in the schema cache via the
Version object.
|
|\ \ \ \
| |_|/ /
|/| | | |
Find query_source_location using lazy Enumerator
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This way, we only need to filter the backtrace up to the first non-noise
stack frame.
This also updates noise to be able to deal with being passed a lazy
enum. We don't need this anywhere, but it seemed better for this to be
consistent.
|
|\ \ \ \
| | | | |
| | | | | |
Bump RuboCop to 0.67.2
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Performance cops will be extracted from RuboCop to RuboCop Performance
when next RuboCop 0.68 will be released.
https://github.com/rubocop-hq/rubocop/issues/5977
RuboCop 0.67 is its transition period.
Since rails/rails repository uses Performance cops, This PR added
rubocop-performance gem to Gemfile.
And this PR fixes some offenses using the following auto-correct.
```console
% bundle exec rubocop -a
Offenses:
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:212:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator =
> should be surrounded by a single space.
"primary" => { adapter: "sqlite3", database: "db/primary.sqlite3" }
^^
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb:239:26:
C: [Corrected] Layout/SpaceAroundOperators: Operator => should be
surrounded by a single space.
"primary" => { adapter: "sqlite3", database: "db/primary.sqlite3" }
^^
actionview/test/template/resolver_shared_tests.rb:1:1: C: [Corrected]
Style/FrozenStringLiteralComment: Missing magic comment #
frozen_string_literal: true.
module ResolverSharedTests
^
actionview/test/template/resolver_shared_tests.rb:10:33: C: [Corrected]
Layout/SpaceAroundEqualsInParameterDefault: Surrounding space missing in
default value assignment.
def with_file(filename, source="File at #{filename}")
^
actionview/test/template/resolver_shared_tests.rb:106:5: C: [Corrected]
Rails/RefuteMethods: Prefer assert_not_same over refute_same.
refute_same a, b
^^^^^^^^^^^
2760 files inspected, 5 offenses detected, 5 offenses corrected
```
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Format a comment to not show up as code [ci skip]
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
Migrate Code Climate config file to new configuration
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I don't know whether have to move to a new configuration, but I think
there is no need to keep using the old configuration.
Ref: https://docs.codeclimate.com/docs/advanced-configuration#section-analysis-configuration-versions
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since 8180c39, remaining transaction state is cleared in
`force_clear_transaction_record_state` to less work
`sync_with_transaction_state`. But it caused a race condition that
`@transaction_state` would be cleared by other threads if the state is
finalized.
To work as before, snapshot `@transaction_state` to local variable not
to refer `@transaction_state` directly.
Fixes #35983.
|
|\ \ \
| | | |
| | | | |
mounted routes with non-word characters
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Remove `required: true` from the model generator template
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`belongs_to` association have `required: true` by default
https://github.com/rails/rails/pull/18937 onwards so we don't need it
in the generator template.
We still need the code for required in the command line generator as
it adds `null: false` in the migration.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
De-duplicate templates, introduce UnboundTemplate
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This adds a bit of complexity, but is necessary for now to avoid holding
extra copies of templates which are resolved from ActionView::Digestor
after disabling cache on the lookup context.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously it's possible to have multiple copies of the "same" Template.
For example, if index.html.erb is found both the :en and :fr locale, it
will return a different Template object for each. The same can happen
with formats, variants, and handlers.
This commit de-duplicates templates, there will now only be one template
per file/virtual_path/locals tuple.
We need to consider virtual_path because both `render "index"`, and
`render "index.html"` can both find the same file but will have
different virtual_paths. IMO this is rare and should be
deprecated/removed, but it exists now so we need to consider it in order
to cache correctly.
This commit introduces a new UnboundTemplate class, which represents a
template with unknown locals. Template objects can be built from it by
using `#with_locals`. Currently, this is just a convenience around
caching templates, but I hope it's a helpful concept that could have
more utility in the future.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We didn't previously have many tests directly against the
OptimizedFileSystemResolver or FileSystemResolver, though usually
failures would be exposed through other tests.
It's easier to test some specifics of the behaviour with unit tests.
This also lets us test FileSystemResolver (non-optimized) which I don't
think previously had much testing (other than from classses inheriting
it).
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Add section on PostgreSQL to the guides index [ci skip]
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Notes tags registration
|