| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some test runs `ActionController::Base.enable_fragment_cache_logging` would be false,
based on the test order.
Turns out it was off because we assigned the config to the `@controller` variable, and
not on `ActionController::Base`.
The test failure was reproducible with, and now passes after this:
```
bin/test test/controller/log_subscriber_test.rb --seed 19918
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement naive partial caching mechanism.
Add test for LogSubscriber
Use ActionView::Base#log_payload to store log_subscriber's payload, so we can pass cache result into it.
Fixed tests
Remove useless settings
Check if #log_payload exists before calling it. Because other classes also includes CacheHelper but don't have is attribute
Use @log_payload_for_partial_reder instead of #log_payload to carry ActionView's payload.
Update test's hash syntax
Add configuration to enable/disable fragment caching logging
Remove unless test and add new test to ensure cache info won't effect next rendering's log
Move :enable_fragment_cache_logging config from ActionView to ActionPack
Apply new config to tests
Update actionview's changelog
Update configuration guide
Improve actionview's changelog
Refactor PartialRenderer#render and log tests
Mute subscriber's log instead of disabling instrumentation.
Fix typo, remove useless comment and use new hash syntax
Improve actionpack's log_subscriber test
Fix rebase mistake
Apply new config to all caching intstrument actions
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
| |
Make request headers available in the event payload so that it is available to attached ActionController::LogSubscribers.
|
|
|
|
|
|
|
|
| |
This solves:
```
Expected /Completed 200 OK in [\d]ms/ to match "Completed 200 OK in 943ms".
```
|
| |
|
| |
|
|
|
|
| |
`head` method works similar to `render` method with `:nothing` option
|
|
|
|
|
|
|
|
| |
Non-kwargs requests are deprecated now.
Guides are updated as well.
`post url, nil, nil, { a: 'b' }` doesn't make sense.
`post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
|
|
|
|
|
|
|
|
| |
See:
* https://github.com/rails/rails/pull/14903
* https://github.com/roidrage/lograge/issues/37
Some code by mxrguspxrt from #14903.
|
| |
|
|
|
|
|
|
|
|
| |
The request attributes filtered_parameters, filtered_env and filtered_path
are memoized for performance reasons. However this can cause unusual
behavior in tests where there are multiple calls to get, post, etc.
Fixes #13803.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cache_if(condition, option, &block) and cache_unless(condition, option, &block).
In the PR #8371 was introduced conditional options :if and :unless in
the cache method.
Example:
<%= cache @model, if: some_condition(@model) do %>
...
<%end%>
This is a good feature but *cache_if* and and *cache_unless*
are more concise and close to the standard of rails view helpers
(ex: link_to_if and link_to_unless).
Example:
<%= cache_if condition, @model do %>
...
<%end%>
|
| |
|
|
|
|
| |
[Stephen Ausman + Fabrizio Regini]
|
| |
|
| |
|
| |
|
|
|
|
| |
a before callback halts.
|
|
|
|
|
|
| |
Needed to move AC::Metal::Instrumentation before AM::Metal::Rescue
so that status codes rendered from rescue_from blocks are logged
properly.
|
|
|
|
| |
:exclude to make it consistent with controller filters
|
| |
|
| |
|
|
|
|
|
|
| |
exception [#6333 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit eec2d301d4ce9df9c71c1a5aa63053eb970b6818.
This commit broke tests. You cannot have a file called "bundler" on the load path.
|
|
|
|
|
|
|
|
|
|
| |
* Add the Rack::Sendfile middleware
* Make the header to use configurable via config.action_dispatch.x_sendfile_header (default to "X-Sendfile").
* Add Railties tests to confirm that these work
* Remove the :stream, :buffer_size, and :x_senfile default options to send_file
* Change the log subscriber to always say "Sent file"
* Add deprecation warnings for options that are now no-ops
Note that servers can configure this by setting X-Sendfile-Type. Hosting companies and those creating packages of servers specially designed for Rails applications are encouraged to specify this header so that this can work transparently.
|
| |
|
|
|