| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Use `serialize_entry` throughout and introduce `serialize_entries`.
|
|
|
|
|
| |
Closes #31886
Fixes #31884
|
|\
| |
| | |
Improve test for TaggedLogging "keeps each tag in their own thread"
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This reverts commit ac74e2c521f6ddc0eac02d74a1313261bcc1d60f, reversing
changes made to ffdb06136152b3c5f7f4a93ca5928e16e755d228.
|
| | |
| | |
| | |
| | | |
Because the master branch is already 6.0.
|
| | |
| | |
| | |
| | | |
:tada::tada::tada:
|
| | |
| | |
| | |
| | |
| | | |
This suppresses `Timeout::Error` exceptions.
Ref: https://travis-ci.org/rails/rails/jobs/334622442#L1089-L1110
|
|\ \ \
| | | |
| | | | |
Fix infinite loop when unloading autoloaded modules
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
error occured during the load.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
config
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
koic/enable_autocorrect_for_lint_end_alignment_cop
Enable autocorrect for `Lint/EndAlignment` cop
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
### Summary
This PR changes .rubocop.yml.
Regarding the code using `if ... else ... end`, I think the coding style
that Rails expects is as follows.
```ruby
var = if cond
a
else
b
end
```
However, the current .rubocop.yml setting does not offense for the
following code.
```ruby
var = if cond
a
else
b
end
```
I think that the above code expects offense to be warned.
Moreover, the layout by autocorrect is unnatural.
```ruby
var = if cond
a
else
b
end
```
This PR adds a setting to .rubocop.yml to make an offense warning and
autocorrect as expected by the coding style.
And this change also fixes `case ... when ... end` together.
Also this PR itself is an example that arranges the layout using
`rubocop -a`.
### Other Information
Autocorrect of `Lint/EndAlignment` cop is `false` by default.
https://github.com/bbatsov/rubocop/blob/v0.51.0/config/default.yml#L1443
This PR changes this value to `true`.
Also this PR has changed it together as it is necessary to enable
`Layout/ElseAlignment` cop to make this behavior.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Support hash as first argument for `assert_difference`.
This allows to specify multiple numeric differences in the same assertion.
Example:
assert_difference 'Article.count' => 1, 'Notification.count' => 2 do
# post :create, params: { article: {...} }
end
* Support error message when passing a hash as a first parameter
* Format CHANGELOG properly
[Julien Meichelbeck + Rafael Mendonça França]
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Fix encoding errors when using the pure-Ruby Redis driver instead of Hiredis. Dodge incompatibilities between UTF-8 and arbitrary value encodings, which rear their heads when the Redis driver tries to build a single command string from incompatibly-encoded keys and values.
|
|/ / / |
|
| | |
| | |
| | |
| | | |
Update the long key handling test so it triggers truncation in the Redis cache store.
|
|\ \ \
| | | |
| | | | |
Use SHA-1 for non-sensitive digests by default
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of providing a configuration option to set the hash function,
switch to SHA-1 for new apps and allow upgrading apps to opt in later
via `new_framework_defaults_5_2.rb`.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
add instrumentation for read_multi
|
| | | | |
| | | | |
| | | | |
| | | | | |
currently it's not possible to know what the hit rates are from read_multi
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add support for Minitest 5.11
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Runnable.marshal_dump/load was removed in
https://github.com/seattlerb/minitest/commit/00433fc0a4fdd0e6b302aace633384ba1312237
Instead, `Minitest::Result` is contained test result and the that can be
marshalled.
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Fix performance issue with NameError#missing_name on ruby >= v2.3.0.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since ruby v2.3.0 `did_you_mean` gem shipped and ENABLED by default.
It patches NameError#message with spell corrections which are SLOW.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Fix rubocop space before comma
|
|/ / / / / / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
`ActiveSupport::OrderedOptions` responds to any message.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
new_framework_defaults_5_2.rb
Enabling this option in new_framework_defaults_5_2.rb didn't work
before, as railtie initializers run before application initializers.
Using `respond_to?` to decide whether to set the option wasn't working
either, as `ActiveSupport::OrderedOptions` responds to any message.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add support for multiple encodings in String.blank?
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Motivation:
- When strings are encoded with `.encode("UTF-16LE")` `.blank?` throws
an `Encoding::CompatibilityError` exception.
- We tested multiple implementation to see what the fastest
implementation was, rescueing the execption seems to be the fastest
option we could find.
Related Issues:
- #28953
Changes:
- Add a rescue to catch the exception.
- Added a `Concurrent::Map` to store a cache of encoded regex objects
for requested encoding types.
- Use the new `Concurrent::Map` cache to return the correct regex for
the string being checked.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
danielma/dma/assert-changes-with-to-should-still-assert-change
`assert_changes` should always assert some change
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
While using `assert_changes`, I came across some unexpected behavior:
if you provide a `to:` argument, and the expression matches but didn't
actually change, the assertion will pass.
The way `assert_changes` reads, I assumed that it would both assert
that there was any change at all, _and_ that the expression changed to
match my `to:` argument.
In the case of just a `from:` argument, `assert_changes` does what I
expect as well. It asserts that the before value `=== from` and that
the after value changed.
My key change is that `assert_changes` will now _always_ assert that
expression changes, no matter what combination of `from:` and `to:`
arguments
|
| |_|_|/ / / /
|/| | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Bump license years for 2018
|
| | |_|_|/ / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Duration created with no parts will have a default seconds part eqaul to 0
|
| | | | | | | |
|
| | | | | | | |
|