aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation
Commit message (Collapse)AuthorAgeFilesLines
* A regression in deprecate_methods was introduced in a982a42:Edouard CHIN2018-07-301-0/+35
| | | | | | | | | | | - Refactoring alias_chain to Module#prepend broke the possibility to deprecate class methods since the module generated was prepended to the target's instance. A suggestion to fix this was to use `AS#redefine_method` which would solve the problem but with the cost of redefining directly the method. Decided to go with the same alias_chain implementation as before instead. - Fixes #33253
* Replace `assert !` with `assert_not`Daniel Colson2018-04-191-3/+3
| | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd.
* Preserve original method visibility when deprecating a methodJordan Brough2017-12-131-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes `deprecate` so that it preserves method visibility (like it did previously when it was utilizing `alias_method_chain`). When Module#prepend replaced alias_method_chain in a982a42 it caused deprecated methods to always become public. `alias_method_chain` had this bit of code: https://github.com/rails/rails/blob/v5.0.6/activesupport/lib/active_support/core_ext/module/aliasing.rb#L40-L47 which preserved method visibility. Without this fix, a workaround would be: ```ruby class C8 private def new_method end def old_method end deprecate :old_method, :new_method # workaround: instance_method(:old_method).owner.send(:private, :old_method) end ``` Because the visibility needs to be fixed on the Module prepended by MethodWrapper.
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-112-0/+2
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-092-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-022-2/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-012-0/+2
|
* modernizes hash syntax in activesupportXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in activesupport/testXavier Noria2016-08-062-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix bug where custom deprecators are not used.Brandon Dunne2015-10-141-0/+34
| | | | | | | | | | | | Add tests for ActiveSupport::Deprecation.deprecate_methods Modify ActiveSupport::Testing::Deprecation to allow a custom deprecator Leverage ActiveSupport::Testing::Deprecation assert_deprecated Update documentation for ActiveSupport::Deprecation.deprecate_methods Use cases: Using the default deprecator => "removed from Rails X.Y" Passing a custom deprecator in the options hash => "removed from MyGem next-release" Deprecating methods directly from custom deprecator => "removed from MyGem next-release"
* Remove deprecated AS::BasicObject, use AS::ProxyObject insteadCarlos Antonio da Silva2013-07-011-12/+0
|
* remove deprecated `BufferedLogger`.Yves Senn2013-07-011-22/+0
|
* deprecation warning when BufferedLogger is instantiatedYves Senn2012-12-251-0/+8
|
* ActiveSupport::BufferedLogger can be subclassedYves Senn2012-12-251-0/+14
|
* AS::BasicObject can be inherited fromPavel Pravosud2012-12-151-0/+12
|
* use AS::TestCase as the base classAaron Patterson2012-01-051-1/+1
|
* fixing space errorsAaron Patterson2010-07-261-4/+4
|
* Test to ensure that falsy objects aren't wrapped by deprecation proxiesLeigh Caplan2010-07-261-0/+22