| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
AS::Callbacks: deprecate monkey patch code
|
| |
| |
| |
| |
| | |
Deprecate usage of filter object with #before and #after
methods as around callback
|
|/
|
|
| |
the method has gone in this commit: 119e9e2dafb0cdc5b85613b730333679aef534af
|
|
|
|
|
| |
They also make more sense here since all the related logic with I18n is
handled by AS::NumberHelper, and not by AV anymore.
|
|
|
|
|
|
| |
Just make use of the returning exception from assert_raise, instead of
calling the method again with a rescue clause to test the saved
exception number.
|
|
|
|
|
| |
ActiveSupport::NumberHelper does not make use of :raise, so there's no
need to propagate it down.
|
|\
| |
| | |
Don't paramify ActionDispatch::Http::UploadedFile in tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To test uploading a file without using fixture_file_upload, a posted
ActionDispatch::Http::UploadedFile should not be paramified (just like
Rack::Test::UploadedFile).
(Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't
share the same API, tempfile is not accessible on
Rack::Test::UploadedFile as discussed in
https://github.com/brynary/rack-test/issues/30)
|
| | |
|
| | |
|
| | |
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
[API docs](http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-phone_field) for `phone_field` provide no information on what the method actually does. no description nor access to source code. so added this
|
| | | |
|
|\ \ \
| | | |
| | | | |
Make the Resolver template cache threadsafe
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In order to avoid holding a global lock when doing template
resolution, instead add individual locks on a per cache entry
basis. The global lock is now only used for manipulation of the main
cache data structure.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Template cache in the Resolver can be accessed by multiple threads
similtaneously in multi-threaded environments. The cache is implemented
using a Hash, which isn't threadsafe in all VMs (notably JRuby).
This commit extracts the cache to a new Cache class and adds mutexes to
prevent concurrent access.
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | | |
1. Change in test name as already defined.
2. ambiguous first argument; put parentheses or
even spaces
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Added test for case when view doesn't have logger method when using
ActionController::Metal controller.
|
| | | |
| | | |
| | | |
| | | | |
ActionController::Metal controller.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are several aspects to this commit, that don't well fit into broken down
commits, so they are detailed here:
* When a user uses response.headers['Cache-Control'] = some_value, then the
documented convention in ConditionalGet is not adhered to, in this case,
response.cache_control is ignored due to `return if
self[CACHE_CONTROL].present?`
* When a middleware sets cache-control headers that would clobber, they're
converted to symbols directly, without underscores. This would lead to bugs.
* Items that would live in :extras if set through expires_in, are placed
directly in the @cache_control hash, and not respected in many cases
(somewhat adhering to the aforementioned documentation).
* Although quite useless, any directive named 'extras' would be ignored.
The general convention applied is that expires_* take precedence, but no longer
overwrite everything and expires_* are ALWAYS applied, even if the header is
set.
I am still unhappy about the contents of this commit, and the code in general.
Ideally it should be refactored to no longer use :extras. I'd likely recommend
expanding @cache_control into a class, and giving it the power to handle the
merge in a more efficient fashion. Such a commit would be a larger change that
could have additional semantic changes for other libraries unless they utilize
expires_in in very standard ways.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Respect absolute paths in compute_source_path.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When using compute_source_path to determine the full path of an
asset, if our source begins with '/', we don't want to include
the directory. Examples are illustrative:
> compute_source_path("foo", "stylesheets", "css")
=> "/Users/steve/src/my_app/public/stylesheets/foo.css"
> compute_source_path("/foo", "stylesheets", "css")
=> "/Users/steve/src/my_app/public/foo.css"
Before this patch, the second example would return the same as the
first.
Fixes #5680.
|
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts commit f5e7cb84cd377feb1b60c5356ce02123e9c94380.
|
| |/
|/| |
|
|\ \ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
framework
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The `path` method on missing helper errors is inconsistent with the
implementation on LoadError in Ruby 2.0. Wrap up the missing helper
exceptions so that the inconsistent behavior is mirrored in Ruby 2.0
(until we can figure out *why* it's inconsistent).
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
These lines don't help to mitigate CVE. They only turn [nil] into nil, w...
|