| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It's common in test cases at my job to have code like this:
let(:today) { customer_start_date + 2.weeks }
let(:earlier_date) { today - 5.days }
With this change, we can instead write
let(:today) { 2.weeks.after(customer_start_date) }
let(:earlier_date) { 5.days.before(today) }
Closes #27721
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Soft-deprecate the `HashWithIndifferentAccess` constant
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This ensures that if we try to hard-deprecate it again in the future,
we won't break these behaviors.
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since using a `ActiveSupport::Deprecation::DeprecatedConstantProxy`
would prevent people from inheriting this class and extending it
from the `ActiveSupport::HashWithIndifferentAccess` one would break
the ancestors chain, that's the best option we have here.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Allow ActiveSupport::MarshalWithAutoloading#load to take a Proc
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
Marshal#load so it can take a proc
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A gzip file has a checksum and length for the decompressed data in its
footer which isn't checked by just calling Zlib::GzipReader#read.
Calling Zlib::GzipReader#close must be called after reading to the end
of the file causes this check to be done, which is done by
Zlib::GzipReader.wrap after its block is called.
|
| | | | | | |
|
| | | | | | |
|
| |_|/ / /
|/| | | |
| | | | | |
This class should not be used directly, the public API is `AS::Duration#iso8601`.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Further missing requires for Timeout exposed due to Bundler 1.14.5
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bundler 1.14.5 moved to lazily loading 'rubygems/spec_fetcher' which
revealed some missing requires from the JSON encoding test file.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
y-yagi/prevent_multiple_values_being_set_to_run_via
Prevent multiple values being set to `run_via`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When executing the test via rake, since `rake` is set for `run_via`, `ruby` should not be set.
Related 2cb6c27310452da11b93d729c3b760ce988106e1
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Pointed out by @matthewd that the HWIA subclass changes the
AS scoped class and top-level HWIA hierarchies out from under
existing classes.
This reverts commit 71da39097b67114329be6d8db7fe6911124531af, reversing
changes made to 41c33bd4b2ec3f4a482e6030b6fda15091d81e4a.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Some improvements to the API site's sidebar
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
There are a lot of monkey patches inside the code base but there's
no need to document external constants so let's remove them from
the documentation
Also, since there are monkey patches for some test cases classes,
there were sometimes both documented and sneaked under the wrong
section in the sidebar.
Finally, for future references, the `active_support/vendor`
folder has been originally ignored in https://git.io/vDqfA but
no longer exists.
[ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This constant was kept for the sake of backward compatibility; it
is still available under `ActiveSupport::HashWithIndifferentAccess`.
Furthermore, since Ruby 2.5 (https://bugs.ruby-lang.org/issues/11547)
won't support top level constant lookup, people would have to update
their code anyway.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
These files are not using `strip_heredoc`.
Closes #27976
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
https://github.com/rails/rails/commit/9e98f3f7e61dfce0a48948c8d296400af8bfaf21#diff-1ecd313ff0ab827af30014553cf8918dL76
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add Time#blank? to blank_test
|
| | | | | | | | |
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
empty lines
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
`halt_and_display_warning_on_return_false`
`halt_and_display_warning_on_return_false` is not a public API and
application is using `halt_callback_chains_on_return_false`.
https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt#L29
https://github.com/rails/rails/blob/5-0-stable/activesupport/lib/active_support.rb#L86..L88
Therefore, deprecate messages should be issued for
`halt_callback_chains_on_return_false` instead of
`halt_and_display_warning_on_return_false`.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
kamipo/remove_deprecated_passing_string_to_define_callback
Remove deprecated passing string to define callback
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`set_callback` and `skip_callback`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
And raise `ArgumentError` when passing string to define callback.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Correct spelling
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
```
go get -u github.com/client9/misspell/cmd/misspell
misspell -w -error -source=text .
```
|
|/ / / / / / / |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When the delegation target is nil and the allow_nil option is not
in use, a Module::DelegationError is raised.
class C
delegate :a, to: :b
def b
nil
end
end
C.new.a
# => Module::DelegationError: C#a delegated to b.a, but b is nil
[ci skip]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Currently, executing the `test_initialize_raises_an_ArgumentError_if_no_block_given`
test alone will result in an error.
```
$ ./bin/test test/evented_file_update_checker_test.rb -n test_initialize_raises_an_ArgumentError_if_no_block_given
Run options: -n test_initialize_raises_an_ArgumentError_if_no_block_given --seed 6692
# Running:
E
Error:
EventedFileUpdateCheckerTest#test_initialize_raises_an_ArgumentError_if_no_block_given:
NameError: uninitialized constant EventedFileUpdateCheckerTest::Listen
rails/activesupport/test/evented_file_update_checker_test.rb:21:in `teardown'
```
This is because if do not specify a file or directory for
`EventedFileUpdateChecker`, do not require `listen`, and using listen
method in teardown.
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/evented_file_update_checker.rb#L53..L65
Therefore, added listen's require to avoid errors.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Currently, executing the `test_initialize_raises_an_ArgumentError_if_no_block_given`
test alone will result in an error.
```
$ ./bin/test test/evented_file_update_checker_test.rb -n test_initialize_raises_an_ArgumentError_if_no_block_given
Run options: -n test_initialize_raises_an_ArgumentError_if_no_block_given --seed 6692
# Running:
E
Error:
EventedFileUpdateCheckerTest#test_initialize_raises_an_ArgumentError_if_no_block_given:
NameError: uninitialized constant EventedFileUpdateCheckerTest::Listen
rails/activesupport/test/evented_file_update_checker_test.rb:21:in `teardown'
```
This is because if do not specify a file or directory for
`EventedFileUpdateChecker`, do not require `listen`, and using listen
method in teardown.
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/evented_file_update_checker.rb#L53..L65
Therefore, added listen's require to avoid errors.
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This removes the following warnings.
```
activesupport/test/file_update_checker_shared_tests.rb:279: warning: assigned but unused variable - checker
```
|
| | | | | | |
|