/
deprecated_methods.rb
55 lines (51 loc) · 1.72 KB
/
deprecated_methods.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module Guard
module DeprecatedMethods
# @deprecated Use `Guard.plugins(filter)` instead.
#
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
# upgrade for Guard 2.0
#
def guards(filter = nil)
::Guard::UI.deprecation(::Guard::Deprecator::GUARDS_DEPRECATION)
plugins(filter)
end
# @deprecated Use `Guard.add_plugin(name, options = {})` instead.
#
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
# upgrade for Guard 2.0
#
def add_guard(*args)
::Guard::UI.deprecation(::Guard::Deprecator::ADD_GUARD_DEPRECATION)
add_plugin(*args)
end
# @deprecated Use
# `Guard::PluginUtil.new(name).plugin_class(fail_gracefully:
# fail_gracefully)` instead.
#
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
# upgrade for Guard 2.0
#
def get_guard_class(name, fail_gracefully = false)
UI.deprecation(Deprecator::GET_GUARD_CLASS_DEPRECATION)
PluginUtil.new(name).plugin_class(fail_gracefully: fail_gracefully)
end
# @deprecated Use `Guard::PluginUtil.new(name).plugin_location` instead.
#
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
# upgrade for Guard 2.0
#
def locate_guard(name)
UI.deprecation(Deprecator::LOCATE_GUARD_DEPRECATION)
PluginUtil.new(name).plugin_location
end
# @deprecated Use `Guard::PluginUtil.plugin_names` instead.
#
# @see https://github.com/guard/guard/wiki/Upgrading-to-Guard-2.0 How to
# upgrade for Guard 2.0
#
def guard_gem_names
UI.deprecation(Deprecator::GUARD_GEM_NAMES_DEPRECATION)
PluginUtil.plugin_names
end
end
end