compat_resource 12.5.6 → 12.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/files/lib/chef_compat/monkeypatches/chef.rb +24 -3
- data/files/lib/chef_compat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25e72c39ecf18932dea010bcf587acf785ccbe8d
|
4
|
+
data.tar.gz: e017d091bb638f0e5ee752b1256ed3f930f1c912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d33c75da3765cdab6ab48d487b8e4445e7513063e967ee528a845e4220888bce91954140b502edd771346e3c0f5a5847ce622e33c9cf84364e192fce8e31843e
|
7
|
+
data.tar.gz: 33d70dd15a3ec91d176a6df06f73f2f0395c09db26ba2217e579c8659cffb99330fafe56dd87492244c6d8319210092c236c87c7fef4d8cf23a08b31bb5f598f
|
@@ -1,9 +1,30 @@
|
|
1
1
|
class Chef
|
2
2
|
NOT_PASSED = Object.new if !defined?(NOT_PASSED)
|
3
3
|
# Earlier versions of Chef didn't have this message
|
4
|
-
|
5
|
-
def
|
6
|
-
|
4
|
+
module ChefCompatDeprecation
|
5
|
+
def log_deprecation(message, location=nil)
|
6
|
+
if superclass.respond_to?(:log_deprecation)
|
7
|
+
if !location
|
8
|
+
# Pick the first caller that is *not* part of the Chef or ChefCompat gem,
|
9
|
+
# that's the thing the user wrote.
|
10
|
+
chef_compat_gem_path = File.expand_path("../../..", __FILE__)
|
11
|
+
chef_gem_path = File.expand_path("../..",::Chef::Resource.instance_method(:initialize).source_location[0])
|
12
|
+
caller(0..10).each do |c|
|
13
|
+
if !c.start_with?(chef_gem_path) && !c.start_with?(chef_compat_gem_path)
|
14
|
+
location = c
|
15
|
+
break
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
super
|
21
|
+
else
|
22
|
+
Chef::Log.warn(message)
|
23
|
+
end
|
7
24
|
end
|
8
25
|
end
|
26
|
+
|
27
|
+
class<<self
|
28
|
+
prepend ChefCompatDeprecation
|
29
|
+
end
|
9
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compat_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.5.
|
4
|
+
version: 12.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|