compat_resource 12.5.22 → 12.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/files/lib/chef_compat/copied_from_chef/chef/property.rb +3 -3
- data/files/lib/chef_compat/copied_from_chef/chef/resource.rb +1 -1
- data/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb +8 -1
- data/files/lib/compat_resource/version.rb +1 -1
- data/files/spec/data/Gemfile.lock +17 -20
- data/files/spec/data/cookbooks/future/libraries/future_custom_resource.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20b6ff32f42d52aecb0ecb45f035cd0f8c249cae
|
4
|
+
data.tar.gz: 307a13a11117fbda601165b63e63d778e9f558b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec41b460026d108a332797bbd87d0285bb3432d2e2a69abed92c724f680c7606cd0b50751f0170f815aca299df194598fb22eab1c5468c18a357fd547221aa11
|
7
|
+
data.tar.gz: c8a0dc03a4daf33d7b471ddb423365391049efd1d06e5c1e7aa16356013d85f6c2673f62bfd1f9007d675e8da0824abd9062ad53cd1f474fba43e77e828bedb9
|
data/Rakefile
CHANGED
@@ -45,14 +45,14 @@ KEEP_FUNCTIONS = {
|
|
45
45
|
resource_name self.use_automatic_resource_name
|
46
46
|
|
47
47
|
identity state state_for_resource_reporter property_is_set reset_property
|
48
|
-
to_hash
|
48
|
+
resource_initializing to_hash
|
49
49
|
self.properties self.state_properties self.state_attr
|
50
50
|
self.identity_properties self.identity_property self.identity_attrs
|
51
51
|
self.property self.property_type
|
52
52
|
self.lazy
|
53
53
|
|
54
54
|
action allowed_actions self.allowed_actions self.default_action
|
55
|
-
|
55
|
+
self.action self.declare_action_class self.action_class
|
56
56
|
|
57
57
|
load_current_value current_value_does_not_exist
|
58
58
|
self.load_current_value
|
@@ -319,9 +319,9 @@ super if defined?(::Chef::Property)
|
|
319
319
|
#
|
320
320
|
# It won't do what they expect. This checks whether you try to *read*
|
321
321
|
# `content` while we are compiling the resource.
|
322
|
-
if resource.
|
323
|
-
|
324
|
-
|
322
|
+
if resource.resource_initializing &&
|
323
|
+
resource.respond_to?(:enclosing_provider) &&
|
324
|
+
resource.enclosing_provider &&
|
325
325
|
resource.enclosing_provider.respond_to?(name)
|
326
326
|
Chef::Log.warn("#{Chef::Log.caller_location}: property #{name} is declared in both #{resource} and #{resource.enclosing_provider}. Use new_resource.#{name} instead. At #{Chef::Log.caller_location}")
|
327
327
|
end
|
@@ -73,7 +73,7 @@ super if defined?(::Chef::Resource)
|
|
73
73
|
return result.values.first if identity_properties.size == 1
|
74
74
|
result
|
75
75
|
end
|
76
|
-
|
76
|
+
attr_accessor :resource_initializing
|
77
77
|
def to_hash
|
78
78
|
# Grab all current state, then any other ivars (backcompat)
|
79
79
|
result = {}
|
@@ -75,7 +75,14 @@ super if defined?(::Chef::ResourceBuilder)
|
|
75
75
|
resource.params = params
|
76
76
|
|
77
77
|
# Evaluate resource attribute DSL
|
78
|
-
|
78
|
+
if block_given?
|
79
|
+
resource.resource_initializing = true
|
80
|
+
begin
|
81
|
+
resource.instance_eval(&block)
|
82
|
+
ensure
|
83
|
+
resource.resource_initializing = false
|
84
|
+
end
|
85
|
+
end
|
79
86
|
|
80
87
|
# emit a cloned resource warning if it is warranted
|
81
88
|
if prior_resource
|
@@ -1,20 +1,20 @@
|
|
1
1
|
GEM
|
2
2
|
specs:
|
3
3
|
builder (3.2.2)
|
4
|
-
chef (12.
|
5
|
-
chef-
|
6
|
-
chef-zero (~> 4.2, >= 4.2.2)
|
4
|
+
chef (12.1.0)
|
5
|
+
chef-zero (~> 4.0)
|
7
6
|
diff-lcs (~> 1.2, >= 1.2.4)
|
8
7
|
erubis (~> 2.7)
|
9
|
-
ffi-yajl (~>
|
8
|
+
ffi-yajl (~> 1.2)
|
10
9
|
highline (~> 1.6, >= 1.6.9)
|
11
10
|
mixlib-authentication (~> 1.3)
|
12
11
|
mixlib-cli (~> 1.4)
|
12
|
+
mixlib-config (~> 2.0)
|
13
13
|
mixlib-log (~> 1.3)
|
14
|
-
mixlib-shellout (
|
14
|
+
mixlib-shellout (>= 2.0.0.rc.0, < 3.0)
|
15
15
|
net-ssh (~> 2.6)
|
16
16
|
net-ssh-multi (~> 1.1)
|
17
|
-
ohai (
|
17
|
+
ohai (~> 8.0)
|
18
18
|
plist (~> 3.1.0)
|
19
19
|
pry (~> 0.9)
|
20
20
|
rspec-core (~> 3.2)
|
@@ -23,13 +23,9 @@ GEM
|
|
23
23
|
rspec_junit_formatter (~> 0.2.0)
|
24
24
|
serverspec (~> 2.7)
|
25
25
|
specinfra (~> 2.10)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
mixlib-shellout (~> 2.0)
|
30
|
-
chef-zero (4.4.0)
|
31
|
-
ffi-yajl (~> 2.2)
|
32
|
-
hashie (>= 2.0, < 4.0)
|
26
|
+
chef-zero (4.2.3)
|
27
|
+
ffi-yajl (>= 1.1, < 3.0)
|
28
|
+
hashie (~> 2.0)
|
33
29
|
mixlib-log (~> 1.3)
|
34
30
|
rack
|
35
31
|
uuidtools (~> 2.1)
|
@@ -37,13 +33,15 @@ GEM
|
|
37
33
|
diff-lcs (1.2.5)
|
38
34
|
erubis (2.7.0)
|
39
35
|
ffi (1.9.10)
|
40
|
-
ffi-yajl (
|
36
|
+
ffi-yajl (1.4.0)
|
37
|
+
ffi (~> 1.5)
|
41
38
|
libyajl2 (~> 1.2)
|
42
|
-
hashie (
|
39
|
+
hashie (2.1.2)
|
43
40
|
highline (1.7.8)
|
44
41
|
ipaddress (0.8.0)
|
45
42
|
libyajl2 (1.2.0)
|
46
43
|
method_source (0.8.2)
|
44
|
+
mime-types (2.99)
|
47
45
|
mixlib-authentication (1.3.0)
|
48
46
|
mixlib-log
|
49
47
|
mixlib-cli (1.5.0)
|
@@ -60,11 +58,11 @@ GEM
|
|
60
58
|
net-ssh (>= 2.6.5)
|
61
59
|
net-ssh-gateway (>= 1.2.0)
|
62
60
|
net-telnet (0.1.1)
|
63
|
-
ohai (8.
|
64
|
-
chef-config (>= 12.5.0.alpha.1, < 13)
|
61
|
+
ohai (8.4.0)
|
65
62
|
ffi (~> 1.9)
|
66
|
-
ffi-yajl (
|
63
|
+
ffi-yajl (>= 1.1, < 3.0)
|
67
64
|
ipaddress
|
65
|
+
mime-types (~> 2.0)
|
68
66
|
mixlib-cli
|
69
67
|
mixlib-config (~> 2.0)
|
70
68
|
mixlib-log
|
@@ -110,7 +108,6 @@ GEM
|
|
110
108
|
net-ssh (>= 2.7, < 3.1)
|
111
109
|
net-telnet
|
112
110
|
sfl
|
113
|
-
syslog-logger (1.6.8)
|
114
111
|
systemu (2.6.5)
|
115
112
|
uuidtools (2.1.5)
|
116
113
|
wmi-lite (1.0.0)
|
@@ -119,7 +116,7 @@ PLATFORMS
|
|
119
116
|
ruby
|
120
117
|
|
121
118
|
DEPENDENCIES
|
122
|
-
chef (
|
119
|
+
chef (>= 12.1, < 12.2)
|
123
120
|
|
124
121
|
BUNDLED WITH
|
125
122
|
1.10.6
|