Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (31 sloc) 1.203 kb
29089bf Xavier Noria revises requires of some AS deprecation files
fxn authored
1 require 'active_support/core_ext/module/deprecation'
71993c6 Piotr Niełacny Change ActiveSupport::Deprecation to class.
LTe authored
2 require 'active_support/deprecation/instance_delegator'
727e9dc Jeremy Kemper Dice up ActiveSupport::Deprecation
jeremy authored
3 require 'active_support/deprecation/behaviors'
4 require 'active_support/deprecation/reporting'
5 require 'active_support/deprecation/method_wrappers'
6 require 'active_support/deprecation/proxy_wrappers'
71993c6 Piotr Niełacny Change ActiveSupport::Deprecation to class.
LTe authored
7 require 'singleton'
6ca6c5d Jeremy Kemper set ActiveSupport::Deprecation.debug = true to see backtraces for deprec...
jeremy authored
8
7692191 Michael Koziarski Initial Version of Deprecation for Rails[Koz]
NZKoz authored
9 module ActiveSupport
8692db5 Rafael Mendonça França Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
10 # \Deprecation specifies the API used by Rails to deprecate methods, instance
11 # variables, objects and constants.
71993c6 Piotr Niełacny Change ActiveSupport::Deprecation to class.
LTe authored
12 class Deprecation
13 include Singleton
14 include InstanceDelegator
15 include Behavior
16 include Reporting
17 include MethodWrapper
18
19 # The version the deprecated behavior will be removed, by default.
20 attr_accessor :deprecation_horizon
7d01778 Jeremy Kemper Deprecation: easier to work with warning behavior as procs; default beha...
jeremy authored
21
71993c6 Piotr Niełacny Change ActiveSupport::Deprecation to class.
LTe authored
22 # It accepts two parameters on initialization. The first is an version of library
23 # and the second is an library name
24 #
25 # ActiveSupport::Deprecation.new('2.0', 'MyLibrary')
26 def initialize(deprecation_horizon = '4.1', gem_name = 'Rails')
27 self.gem_name = gem_name
28 self.deprecation_horizon = deprecation_horizon
29 # By default, warnings are not silenced and debugging is off.
30 self.silenced = false
31 self.debug = false
32 end
7692191 Michael Koziarski Initial Version of Deprecation for Rails[Koz]
NZKoz authored
33 end
2c690a0 Robert Pankowecki extend ActiveSupport::Deprecation with self, allow other objects to exte...
paneq authored
34 end
Something went wrong with that request. Please try again.