| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This commit more or less undoes 9b5401f, restores autoloaded? not to
touch the descendants tracker, and autoloaded_constants because it is
documented in the guide.
|
|\
| |
| | |
Refactor `ActiveSupport::Deprecation.deprecate_methods` not to expose internal methods
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
internal methods
In #33325, `deprecate_methods` is replaced from `prepend` to completely
emurated `alias_method_chain`, it exposed two internal methods
`xxx_with_deprecation` and `xxx_without_deprecation`.
After that, #34648 restored the `prepend` implementation, which doesn't
expose any internal methods, so we no longer be able to ensure to always
expose that internal methods.
As I said at https://github.com/rails/rails/pull/33325#issuecomment-409016725,
I think that internal methods exposed is not a specification but a
limitation when using `alias_method_chain`, there is no longer a reason
to follow that limitation.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Actionable errors let's you dispatch actions from Rails' error pages. This
can help you save time if you have a clear action for the resolution of
common development errors.
The de-facto example are pending migrations. Every time pending migrations
are found, a middleware raises an error. With actionable errors, you can
run the migrations right from the error page. Other examples include Rails
plugins that need to run a rake task to setup themselves. They can now
raise actionable errors to run the setup straight from the error pages.
Here is how to define an actionable error:
```ruby
class PendingMigrationError < MigrationError #:nodoc:
include ActiveSupport::ActionableError
action "Run pending migrations" do
ActiveRecord::Tasks::DatabaseTasks.migrate
end
end
```
To make an error actionable, include the `ActiveSupport::ActionableError`
module and invoke the `action` class macro to define the action. An action
needs a name and a procedure to execute. The name is shown as the name of a
button on the error pages. Once clicked, it will invoke the given
procedure.
|
|
|
|
|
|
|
| |
There are four ways to pass the redis option, but only three were
documented. This is now consistent with implementation.
[ci skip]
|
|\
| |
| | |
Preserve html_safe? status on ActiveSupport::SafeBuffer#*
|
| | |
|
|/
|
|
|
|
| |
Resolves https://github.com/rails/rails/issues/35835
If an exception occurs during `parallelize_setup` make sure to catch that exception and apply it to the result of each successive test run. This results in marking all of the tests as failed to bring attention to the issue & ensure it is addressed before proceeding.
|
|\
| |
| | |
Describe how to silence the deprecation warning about empty I18n fall…
|
| | |
|
|\ \
| | |
| | | |
Add documentations to concern methods [ci skip]
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
- Unused since https://github.com/rails/rails/commit/a91ea1d51048342d13f
|
|\ \ \
| | | |
| | | | |
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
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When trying to call mget in Redis without any
parameters, a Redis error is thrown. To avoid
this, we circumvent Redis entirely when there
are no key names given.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is newly added at 7b6b10542d5dac2b50f2578143dc5d70120d1146.
```
% be rubocop -a
Inspecting 2781 files
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body beginning.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:12:13: C: [Corrected] Style/RedundantBegin: Redundant begin block detected.
begin
^^^^^
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:13:11: C: [Corrected] Layout/IndentationWidth: Use 2 (not 4) spaces for indentation.
Rails.autoloaders.main.reload
^^^^
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end.
activesupport/lib/active_support/dependencies/zeitwerk_integration.rb:16:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
2781 files inspected, 6 offenses detected, 6 offenses corrected
```
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The original message from Zeitwerk is "can't reload, please call
loader.enable_reloading before setup (Zeitwerk::Error)", which is not
very informative for Rails programmers.
Rails should err with a message worded in terms of its interface.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
sushantmittal/add_deattach_from_in_active_support_subscriber
Adds 'detach_from' to 'ActiveSupport::Subscriber' to detach a subscriber from a namespace.
|
| | |
| | |
| | |
| | | |
from a namespace.
|
|\ \ \
| | | |
| | | | |
Hash / HashWithIndifferentAccess speed improvements
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* add leading `#` before `=>` since hash rocket is valid Ruby code
* add backticks
* remove trailing spaces
* and more
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
sub, sub!, gsub, and gsub! should set back references
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before:
```ruby
(1..10).cover?(1...11) => false
```
After:
```ruby
(1..10).cover?(1...11) => true
```
See https://git.io/fjTtz for the commit against Ruby core that added
support for Range arguments, with similar handling of this case.
|
| | | |
| | | |
| | | |
| | | | |
Hex encoding is base 16 which makes the original input twice as big. With this change less time need to be spent in fixed_length_secure_compare.
|
| | | |
| | | |
| | | |
| | | | |
It allows anonymous subclasses to be garbage collected.
|
| | | |
| | | |
| | | |
| | | | |
with change to ActiveSupport::Notifications::Instrumenter#instrument
|
| | | |
| | | |
| | | |
| | | |
| | | | |
* Update #instrument to make passing a block optional. This will let users
leverage #instrument for messaging in addition to instrumentation.
|
| | | | |
|