aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/digestor.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Action View] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts c4d1a4efeec6f0b5b58222993aa0bec85a19b6a8
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* [Action View] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Fix rubocop violationsyuuji.yaginuma2017-04-121-1/+1
|
* Stop complaining about not being able to digest dynamic template partial ↵David Heinemeier Hansson2017-03-221-2/+4
| | | | names and simplify error logging to a single line when not
* Avoid bumping the class serial when invoking executorMatthew Draper2016-10-031-0/+6
|
* applies new string literal convention in actionview/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Eliminate extra template lookup in ActionView::DigestorJavan Makhmali2016-07-141-2/+1
|
* `partial` option on the digest method is no more needed [ci skip]:Edouard CHIN2016-07-021-1/+0
| | | | - `partial` option is not used anymore, this was removed in https://github.com/rails/rails/pull/23724
* Fix finding templates for digesting for */* requests that render a ↵Javan Makhmali2016-06-151-3/+6
| | | | non-default (html) template
* Explicity find with the rendered format to handle searching multiple view ↵Javan Makhmali2016-06-151-3/+1
| | | | paths correctly
* Fix digesting templates with identical logical names when requesting a ↵Javan Makhmali2016-06-151-3/+6
| | | | format other than the first default
* Remove extranous spaces from assignment.Kasper Timm Hansen2016-05-161-1/+1
| | | | | Leftover from an earlier commit, chose to fix because I was just down in this file.
* Replace middleware with executor callback.Kasper Timm Hansen2016-05-161-7/+0
| | | | | | | | | | | | | Per request digest caches were added before we had hooks into different units of work that Rails performs. As such the most reliable way to prevent stale cache digests was with a middleware. The middleware prevented staleness in Action Controller requests. However, the executor is superior because it should also prevent staleness when running just Active Job jobs or broadcasting through Action Cable's server.
* push partial name regexp upAaron Patterson2016-02-181-2/+2
| | | | | we know that all child templates will be considered as "partials", so the only one that needs detection by name is the root node
* push injected dependencies up to the `digest` methodAaron Patterson2016-02-181-7/+7
| | | | | | Only the root node has injected dependencies, so we don't need to care about them at lower levels. This change pushes the injected dependencies up to where the user passed them in.
* cache all subnodes in the digest cacheAaron Patterson2016-02-181-8/+10
| | | | | | | | | this is for backwards compatibility. We should remove this after 5-0-stable is created because digest calculation should be amortized. Caching digests of subtrees will speed up digests for other trees that share the same children. However, this will also increase memory, and after the app warms up, then those subtrees will never be reused which means that memory is wasted.
* Merge branch 'master' into treewipAaron Patterson2016-02-181-7/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (27 commits) move digest cache on to the DetailsKey object remove object `hash` cache [ci skip] fix suggested change-replace 'an' with 'the in Rails engine guide' Missing documentation about hash algorithm option for MessageVerifier [ci skip] set `skip_listen` option to dummy appplication Fix the language in engines guide Add accidentally removed `#` [ci skip] fields_for_style needs to test for AC::Parameters Fix indentation for code block in changelog Remove accidentally duplicated change log title [ci skip] partially revert 69009f4473637a44ade26d954ef5ddea6ff903f2 Remove needless `case_insensitive_comparison` in mysql2 adapter modify to `error` also abort when specify fail fast option Implement ActionController::Parameters#inspect remove unused method Remove unused Journey code Add Action Cable CHANGELOG in release notes [ci skip] Show proper error message when a non-relation object is passed to AR::Relation#or Fix semantics of test names for finish option in batches_test Fix typo ... Conflicts: actionview/lib/action_view/digestor.rb
| * move digest cache on to the DetailsKey objectAaron Patterson2016-02-181-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This moves digest calculation cache on to the details key object. Before, the digest cache was a class level ivar, and one of the keys was the hash value of the details key object: https://github.com/rails/rails/blob/13c4cc3b5aea02716b7459c0da641438077f5236/actionview/lib/action_view/digestor.rb#L28 An object's hash value is not unique, so it's possible for this cache key to produce colliding keys with no resolution. This commit move cache on to the details key object itself, so we know that the digests are always unique per details key object.
* | convert `digest` to only use kwargsAaron Patterson2016-02-171-4/+2
| |
* | fix rake tasksAaron Patterson2016-02-161-4/+4
| |
* | remove more dead codeAaron Patterson2016-02-161-10/+2
| |
* | remove dead codeAaron Patterson2016-02-161-141/+34
| | | | | | | | | | | | this commit removes unused code and changes the monitor to a mutex. Since the digest doesn't recurse on itself anymore, we can just use a mutex
* | change internal implementation to use a treeAaron Patterson2016-02-161-2/+22
| |
* | convert structs to a regular classAaron Patterson2016-02-161-8/+12
| |
* | clean up classes a littleAaron Patterson2016-02-161-12/+23
| |
* | fix recursive templatesAaron Patterson2016-02-161-20/+40
| |
* | pull template check up to match existing behaviorAaron Patterson2016-02-161-13/+10
| | | | | | | | also remove the EMPTY node since we won't need it
* | introduce a `tree` factory method for creating the dep treeAaron Patterson2016-02-161-0/+55
|/ | | | also add an EMPTY sentinel node
* push kwargs up to the user facing APIAaron Patterson2016-02-121-9/+9
| | | | | | | this lets us leverage Ruby's kwarg handling (exceptions for missing params, etc) ASAP which allows us to skip active support method calls and make sure the exception stack is closer to where the user called the methods.
* use kwargs to avoid hash slicingAaron Patterson2016-02-121-3/+3
| | | | | we can use kwargs in this case to avoid values_at and except calls on the options hash
* Don't capture the MissingTemplate exception.Kasper Timm Hansen2016-02-111-1/+1
| | | | Wasn't removed in 57ac777.
* Oops. :cut:Aaron Patterson2016-02-111-6/+0
|
* follow indentation rulesAaron Patterson2016-02-111-5/+11
|
* make the logger method always return somethingAaron Patterson2016-02-111-4/+9
| | | | then we can stop scattering nil checks (e.g. `try`) through the class.
* Require only necessary concurrent-ruby classes.Jerry D'Antonio2015-11-041-1/+1
|
* Replaced `ThreadSafe::Map` with successor `Concurrent::Map`.Jerry D'Antonio2015-09-191-3/+3
| | | | | | | The thread_safe gem is being deprecated and all its code has been merged into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly the same as its predecessor except for fixes to two bugs discovered during the merge.
* Add wildcard template dependencies.Kasper Timm Hansen2015-07-261-1/+1
|
* Make digest cache work in development.Kasper Timm Hansen2015-07-181-4/+8
| | | | | | Avoid computing the same fragment digest many times when looping over templates. The cache is cleared on every request so template changes are still picked up.
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-06-211-1/+1
|\ | | | | | | | | Conflicts: guides/source/configuring.md
| * [ci skip] Fix to Fixed-width Fontyui-knk2015-06-141-1/+1
| | | | | | | | LookupContext is class name
* | add error log that notify 'file not found' when using ↵Faruk AYDIN2015-05-071-1/+2
|/ | | | cache_digests:dependency and cache_digests:nested_dependency tasks
* Log digest as :debug instead of :infoAlan Skorkin2014-07-151-1/+1
|
* Digestor should just rely on the finder to know about the format and the ↵David Heinemeier Hansson2014-03-211-60/+29
| | | | variant -- trying to pass it back in makes a mess of things (oh, and doesnt work)
* Log the full path, including variant, that the digestor is trying to findDavid Heinemeier Hansson2014-03-211-3/+4
|
* Fix for digestor to consider variants for partials -- this still needs more ↵David Heinemeier Hansson2014-03-211-2/+2
| | | | testing!!
* Warning removed (...) interpreted as grouped expressionArun Agrawal2014-03-201-1/+1
|
* Clarify AV::Digestor.digest method signature docs and deprecation warningJeremy Kemper2014-03-151-22/+21
|
* Fix the resolver cache and stop mutating the lookup_contextRafael Mendonça França2014-03-141-2/+2
| | | | | Before we had a bug in the resolver cache so the disable_cache were not working when passing options to find
* Introduce #with_formats_and_variants to prevent problems with mutating ↵Łukasz Strzałkowski2014-03-141-5/+2
| | | | finder object