| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this, `XmlMini_JDOM` raises an error as follwing:
```
RuntimeError: can't modify frozen String
org/jruby/RubyString.java:2264:in `concat'
activesupport/lib/active_support/xml_mini/jdom.rb:177:in `block in empty_content?'
org/jruby/RubyRange.java:485:in `each'
activesupport/lib/active_support/xml_mini/jdom.rb:174:in `empty_content?'
activesupport/lib/active_support/xml_mini/jdom.rb:86:in `collapse'
activesupport/lib/active_support/xml_mini/jdom.rb:66:in `merge_element!'
activesupport/lib/active_support/xml_mini/jdom.rb:84:in `block in collapse'
org/jruby/RubyRange.java:485:in `each'
activesupport/lib/active_support/xml_mini/jdom.rb:82:in `collapse'
activesupport/lib/active_support/xml_mini/jdom.rb:66:in `merge_element!'
activesupport/lib/active_support/xml_mini/jdom.rb:51:in `parse'
activesupport/lib/active_support/xml_mini.rb:101:in `parse'
```
We already have tests about `XmlMini_JDOM`. But it is not running in CI.
https://github.com/rails/rails/blob/master/activesupport/test/xml_mini/jdom_engine_test.rb
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
add missing newline
call #deep_merge instead of #dup.deep_merge!
make variable and parameter naming more consistent
change `_key` to `key`
faster implementation of Hash#deep_merge
|
|
|
|
| |
Fixes commit 10bf93ef92a70ae511036134290bf0e2de184b5c created to solve issue #30025
|
|
|
|
| |
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
|
|
|
|
| |
Provide run_once: true option to on_load in case you want a hook only to be executed once. This may be useful in cases where executing a hook several times may have undesired side effects
|
|\
| |
| |
| |
| | |
kaspth/verifier-encryptor-null-serializer-metadata
Perform self-serialization once metadata is involved.
|
| |
| |
| |
| | |
Adds support for metadata even when using ActiveSupport::MessageEncryptor::NullSerializer.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add test for the new exception of delegate_missing_to
* Add a changelog entry
* Only check for nil if NoMethodError was raised
* Make method private
* Have to pass both target name and value
* Inline the re-raise
[Rafael Mendonça França + Anton Khamets]
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some examples and guides we are recommending to use code like:
```ruby
verified_user = User.find_by(id: cookies.signed[:user_id])
```
My suggestion is to use instead:
```ruby
verified_user = User.find_by(id: cookies.encrypted[:user_id])
```
which invites users to prefer the "newer" encrypted cookies over the
"legacy" signed cookies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Extend image_tag to accept ActiveStorage's Attachments and Variants
* Flip resolve_image_source around
* Add tests for the new use-cases of image_tag
* Remove the higher-level test
* Update image_tag documentation
* Add error states into the test suite
* Re-raise polymorhic_url's NoMethodError as ArgumentError
* delegate_missing_to will raise DelegationError instead of NoMethodError
|
|
|
|
|
|
| |
Light grammar edits.
[ci skip]
|
|
|
|
| |
It was right as originally written in #15440.
|
|\
| |
| | |
Deprecate `LoadError::REGEXPS` constant
|
| |
| |
| |
| | |
since 4ad1a52, `LoadError::REGEXPS` is no longer needed.
|
|/ |
|
|
|
|
| |
[ci skip]
|
|\
| |
| | |
Update String#camelize to provide feedback when a wrong option is sent
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
String#camelize was returning nil without any feedback when an
invalid option was passed as parameter. This update makes the method
to raises an ArgumentError when the option passed is invalid, similar
to what Ruby does for String#downcase (and others) in 2.4.1.
https://ruby-doc.org/core-2.4.1/String.html#method-i-downcase
|
|\ \
| | |
| | | |
Use File::NULL instead of "/dev/null"
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as
a wrapper around a numeric value as a way of ensuring a duration
was the outcome of an expression. However the implementation was
missing support for modulo operations. This commit adds support
for those operations and should result in a duration being
returned from expressions involving them.
Fixes #29603 and #29743.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PR #29163 introduced a change in behavior when a duration was
the denominator in a calculation - this was incorrect as dividing
by a duration should always return a `Numeric`. The behavior of
previous versions of Rails has been restored.
Fixes #29592.
|
| |
| |
| |
| | |
Signed-off-by: Yuki Nishijima <yk.nishijima@gmail.com>
|
| |\
| | |
| | | |
Fix test failure in message verifier tests
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Without this, I get the following result on my machine
```
# Running:
F
Failure:
MessageVerifierTest#test_backward_compatibility_messages_signed_without_metadata [/home/deivid/Code/rails/activesupport/test/message_verifier_test.rb:91]:
--- expected
+++ actual
@@ -1 +1 @@
-{:some=>"data", :now=>2010-01-01 00:00:00 +0100}
+{:some=>"data", :now=>2010-01-01 00:00:00 +0000}
bin/test test/message_verifier_test.rb:89
```
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
The paragraphs retread ground covered by the title and the usage examples,
so let's just remove them.
[ Assain Jaleel & Kasper Timm Hansen ]
|
| |\
| | |
| | | |
Document metadata support for MessageEncryptor
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| |\ \
| | | |
| | | | |
Remove time stubs after each test
|
| | | |
| | | |
| | | |
| | | | |
Reverts 7abb6e0.
|
| | | |
| | | |
| | | |
| | | | |
[ Assain Jaleel & Kasper Timm Hansen ]
|
| | |/
| |/|
| | |
| | | |
[ Assain Jaleel & Kasper Timm Hansen ]
|
| | | |
|
| | | |
|
| |\ \
| | | |
| | | | |
Fix HashWithIndifferentAccess#default when include?(nil)
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The implementation of HashWithIndifferentAccess#default didn't
distinguish `default` from `default(nil)`, which caused an incorrect
result for `default` if `nil` was used as a key.
Define HashWithIndifferentAccess#dig so that hackery that behaves
differently from Hash#default can be removed from
HashWithIndifferentAccess#default.
|
| |\ \
| | | |
| | | | |
Add documentation for class_attribute default option
|
| | | | |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We have some indentation cops. But now there is a little inconsistent
params indentations. Enable `Layout/FirstParameterIndentation` cop to
prevent newly inconsistent indentation added and auto-correct to
existing violations.
|
| | | | | |
|