blob: 0bbd41386731ce347f9168a7106b4d65aa55fedb (
plain)
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
|
provides :buck_passer
def without_deprecation_warnings(&block)
old_treat_deprecation_warnings_as_errors = Chef::Config[:treat_deprecation_warnings_as_errors]
Chef::Config[:treat_deprecation_warnings_as_errors] = false
begin
block.call
ensure
Chef::Config[:treat_deprecation_warnings_as_errors] = old_treat_deprecation_warnings_as_errors
end
end
def action_pass_buck
lwrp_foo :prepared_thumbs do
action :prepare_thumbs
# We know there will be a deprecation error here; head it off
without_deprecation_warnings do
provider :lwrp_thumb_twiddler
end
end
lwrp_foo :twiddled_thumbs do
action :twiddle_thumbs
# We know there will be a deprecation error here; head it off
without_deprecation_warnings do
provider :lwrp_thumb_twiddler
end
end
end
|