aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/actionpack/abstract
Commit message (Collapse)AuthorAgeFilesLines
* Introduce Template::File as new render file:John Hawthorn2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The previous behaviour of render file: was essentially the same as render template:, except that templates can be specified as an absolute path on the filesystem. This makes sense for historic reasons, but now render file: is almost exclusively used to render raw files (not .erb) like public/404.html. In addition to complicating the code in template/resolver.rb, I think the current behaviour is surprising to developers. This commit deprecates the existing "lookup a template from anywhere" behaviour and replaces it with "render this file exactly as it is on disk". Handlers will no longer be used (it will render the same as if the :raw handler was used), but formats (.html, .xml, etc) will still be detected (and will default to :plain). The existing render file: behaviour was the path through which Rails apps were vulnerable in the recent CVE-2019-5418. Although the vulnerability has been patched in a fully backwards-compatible way, I think it's a strong hint that we should drop the existing previously-vulnerable behaviour if it isn't a benefit to developers.
* Bump RuboCop to 0.66.0Koichi ITO2019-03-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | ### Summary RuboCop 0.66.0 has been released. https://github.com/rubocop-hq/rubocop/releases/tag/v0.66.0 And rubocop-0-66 channel is available in Code Climate. https://github.com/codeclimate/codeclimate/releases/tag/v0.84.0 RuboCop 0.66.0 fixed the false negative to indentation for modifier. And this PR applied the auto-correction fixed by it. https://github.com/rubocop-hq/rubocop/pull/6792 In addtion, this PR is also updating the following 4 gems that RuboCop depends on. - Update Psych gem ... https://github.com/rubocop-hq/rubocop/pull/6766 - Update Parser gem to 2.6.2.0 that supports Ruby 2.5.5 and 2.6.2 ... https://github.com/whitequark/parser/blob/v2.6.2.0/CHANGELOG.md#changelog - Remove powerpack gem ... https://github.com/rubocop-hq/rubocop/pull/6806 - Update unicode-display_width gem ... https://github.com/rubocop-hq/rubocop/pull/6813
* Merge pull request #31005 from shuheiktgw/remove_unnecessary_semicolonsMatthew Draper2017-10-281-1/+1
| | | | Removed unnecessary semicolons
* Fix RuboCop offensesKoichi ITO2017-08-161-2/+2
| | | | And enable `context_dependent` of Style/BracesAroundHashParameters cop.
* Use frozen string literal in actionview/Kir Shatrov2017-07-244-0/+8
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-024-4/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-014-0/+4
|
* Define path with __dir__bogdanvlviv2017-05-232-4/+4
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Fix `require_dependency` message formatRyuta Kamizono2016-11-251-1/+1
| | | | | | | | | | | | `depend_on` message format is `"No such file to load -- %s.rb"`. But `require_dependency` message is missing `.rb` suffix. ``` % git grep -n 'No such file to load' actionview/test/actionpack/abstract/helper_test.rb:112: assert_equal "No such file to load -- very_invalid_file_name.rb", e.message activesupport/lib/active_support/dependencies.rb:245: def require_dependency(file_name, message = "No such file to load -- %s.rb") activesupport/lib/active_support/dependencies.rb:333: def depend_on(file_name, message = "No such file to load -- %s.rb") ```
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-1/+1
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* Add three new rubocop rulesRafael Mendonça França2016-08-161-3/+3
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* applies remaining conventions across the projectXavier Noria2016-08-064-8/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-062-22/+22
|
* modernizes hash syntax in actionviewXavier Noria2016-08-064-34/+34
|
* applies new string literal convention in actionview/testXavier Noria2016-08-064-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add more test coverage to layoutsRafael Mendonça França2016-05-201-4/+152
| | | | [Rafael Mendonça França + Nick Sutterer + thedarkone]
* keep layouts + locals from bloating the cacheAaron Patterson2016-05-171-0/+19
| | | | | | Using locals will cause layouts to be cached multiple times in the template cache. This commit removes locals from consideration when looking up the layout.
* locals can be accessed from templates rendered in the controllerAaron Patterson2016-05-171-0/+16
|
* Delete needless `require 'active_support/deprecation'`yui-knk2015-10-201-1/+0
| | | | | When `require 'active_support/rails'`, 'active_support/deprecation' is automatically loaded.
* Stop using deprecated `render :text` in testPrem Sichanugrist2015-07-172-3/+4
| | | | | | | | | This will silence deprecation warnings. Most of the test can be changed from `render :text` to render `:plain` or `render :body` right away. However, there are some tests that needed to be fixed by hand as they actually assert the default Content-Type returned from `render :body`.
* Cleaning unused views from actionpack tests inside actionviewThiago Pradi2015-03-141-1/+0
|
* Remove wrong TODO commentRafael Mendonça França2015-01-041-1/+1
|
* Remove deprecated `AbstractController::Base::parent_prefixes`Rafael Mendonça França2015-01-041-16/+0
|
* Following documentation guidelineRafael Mendonça França2014-05-141-4/+3
|
* deprecate AbC:Base::parent_prefixes.Nick Sutterer2014-05-131-0/+49
| | | | | | rename ::_local_prefixes to ::local_prefixes to state the public attribute. document the latter. make ::local_prefixes private, test overriding it and remove documentation for overriding ::_parent_prefixes.
* Ensure that .process return the method returnArthur Neves2014-05-061-8/+8
|
* Prefer assert_raise instead of flunk + rescue to test for exceptionsCarlos Antonio da Silva2013-12-191-3/+3
| | | | | | Change most tests to make use of assert_raise returning the raised exception rather than relying on a combination of flunk + rescue to check for exception types/messages.
* More typo fixesAkira Matsuda2013-11-271-1/+1
|
* Minor typo fixesAkira Matsuda2013-11-271-3/+3
|
* Refactor File.expand_path usage to remove additional File.joinAlex Johnson2013-11-051-1/+1
|
* Move abstract's controller tests to AVŁukasz Strzałkowski2013-08-2514-0/+886
The ones that were actually testing AV functionality and should belong in there