compat_resource 12.5.23 → 12.5.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20b6ff32f42d52aecb0ecb45f035cd0f8c249cae
4
- data.tar.gz: 307a13a11117fbda601165b63e63d778e9f558b4
3
+ metadata.gz: b43476b4e56018153025c91b2b3d6e5d4ecf3021
4
+ data.tar.gz: 48a0daf0fad464624385d8281de0f949a459985e
5
5
  SHA512:
6
- metadata.gz: ec41b460026d108a332797bbd87d0285bb3432d2e2a69abed92c724f680c7606cd0b50751f0170f815aca299df194598fb22eab1c5468c18a357fd547221aa11
7
- data.tar.gz: c8a0dc03a4daf33d7b471ddb423365391049efd1d06e5c1e7aa16356013d85f6c2673f62bfd1f9007d675e8da0824abd9062ad53cd1f474fba43e77e828bedb9
6
+ metadata.gz: 860a5a3512307bbc876109f6b730e15cd2f8093848dee6757588ea9792e2437deeace765f21fa9aff6819d4f3ace355033711e90f64d6f41504e3ce7dff5cfa7
7
+ data.tar.gz: 8f8c861770dd8a4eadba59284c72b4a615c12d234b62e4663745de373959adf61f2bd50e43d49858e14ed0dc1ef64f876a280d6ca859bb99456f45d712161d7b
data/Rakefile CHANGED
@@ -45,7 +45,7 @@ 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
- resource_initializing to_hash
48
+ resource_initializing 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
@@ -319,7 +319,8 @@ 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.resource_initializing &&
322
+ if resource.respond_to?(:resource_initializing) &&
323
+ resource.resource_initializing &&
323
324
  resource.respond_to?(:enclosing_provider) &&
324
325
  resource.enclosing_provider &&
325
326
  resource.enclosing_provider.respond_to?(name)
@@ -73,7 +73,14 @@ super if defined?(::Chef::Resource)
73
73
  return result.values.first if identity_properties.size == 1
74
74
  result
75
75
  end
76
- attr_accessor :resource_initializing
76
+ attr_reader :resource_initializing
77
+ def resource_initializing=(value)
78
+ if value
79
+ @resource_initializing = true
80
+ else
81
+ remove_instance_variable(:@resource_initializing)
82
+ end
83
+ end
77
84
  def to_hash
78
85
  # Grab all current state, then any other ivars (backcompat)
79
86
  result = {}
@@ -142,7 +142,7 @@ super if defined?(::Chef::ResourceBuilder)
142
142
  @prior_resource ||=
143
143
  begin
144
144
  key = "#{type}[#{name}]"
145
- prior_resource = run_context.resource_collection.lookup(key)
145
+ run_context.resource_collection.lookup(key)
146
146
  rescue Chef::Exceptions::ResourceNotFound
147
147
  nil
148
148
  end
@@ -20,5 +20,18 @@ class Chef
20
20
  provider.current_resource
21
21
  end
22
22
  end
23
+ # These methods are necessary for new resources to initialize old ones properly
24
+ if !method_defined?(:resource_initializing)
25
+ attr_reader :resource_initializing
26
+ end
27
+ if !method_defined?(:resource_initializing=)
28
+ def resource_initializing=(value)
29
+ if value
30
+ @resource_initializing = value
31
+ else
32
+ remove_instance_variable(:@resource_initializing)
33
+ end
34
+ end
35
+ end
23
36
  end
24
37
  end
@@ -1,3 +1,3 @@
1
1
  module CompatResource
2
- VERSION = '12.5.23'
2
+ VERSION = '12.5.24'
3
3
  end
@@ -1,8 +1,7 @@
1
1
  GEM
2
2
  specs:
3
- builder (3.2.2)
4
- chef (12.1.0)
5
- chef-zero (~> 4.0)
3
+ chef (12.0.3)
4
+ chef-zero (~> 3.2)
6
5
  diff-lcs (~> 1.2, >= 1.2.4)
7
6
  erubis (~> 2.7)
8
7
  ffi-yajl (~> 1.2)
@@ -17,14 +16,8 @@ GEM
17
16
  ohai (~> 8.0)
18
17
  plist (~> 3.1.0)
19
18
  pry (~> 0.9)
20
- rspec-core (~> 3.2)
21
- rspec-expectations (~> 3.2)
22
- rspec-mocks (~> 3.2)
23
- rspec_junit_formatter (~> 0.2.0)
24
- serverspec (~> 2.7)
25
- specinfra (~> 2.10)
26
- chef-zero (4.2.3)
27
- ffi-yajl (>= 1.1, < 3.0)
19
+ chef-zero (3.2.1)
20
+ ffi-yajl (~> 1.1)
28
21
  hashie (~> 2.0)
29
22
  mixlib-log (~> 1.3)
30
23
  rack
@@ -48,16 +41,12 @@ GEM
48
41
  mixlib-config (2.2.1)
49
42
  mixlib-log (1.6.0)
50
43
  mixlib-shellout (2.2.5)
51
- multi_json (1.11.2)
52
- net-scp (1.2.1)
53
- net-ssh (>= 2.6.5)
54
44
  net-ssh (2.9.2)
55
45
  net-ssh-gateway (1.2.0)
56
46
  net-ssh (>= 2.6.5)
57
47
  net-ssh-multi (1.2.1)
58
48
  net-ssh (>= 2.6.5)
59
49
  net-ssh-gateway (>= 1.2.0)
60
- net-telnet (0.1.1)
61
50
  ohai (8.4.0)
62
51
  ffi (~> 1.9)
63
52
  ffi-yajl (>= 1.1, < 3.0)
@@ -77,37 +66,7 @@ GEM
77
66
  slop (~> 3.4)
78
67
  rack (1.6.4)
79
68
  rake (10.4.2)
80
- rspec (3.4.0)
81
- rspec-core (~> 3.4.0)
82
- rspec-expectations (~> 3.4.0)
83
- rspec-mocks (~> 3.4.0)
84
- rspec-core (3.4.1)
85
- rspec-support (~> 3.4.0)
86
- rspec-expectations (3.4.0)
87
- diff-lcs (>= 1.2.0, < 2.0)
88
- rspec-support (~> 3.4.0)
89
- rspec-its (1.2.0)
90
- rspec-core (>= 3.0.0)
91
- rspec-expectations (>= 3.0.0)
92
- rspec-mocks (3.4.0)
93
- diff-lcs (>= 1.2.0, < 2.0)
94
- rspec-support (~> 3.4.0)
95
- rspec-support (3.4.1)
96
- rspec_junit_formatter (0.2.3)
97
- builder (< 4)
98
- rspec-core (>= 2, < 4, != 2.12.0)
99
- serverspec (2.24.3)
100
- multi_json
101
- rspec (~> 3.0)
102
- rspec-its
103
- specinfra (~> 2.43)
104
- sfl (2.2)
105
69
  slop (3.6.0)
106
- specinfra (2.45.0)
107
- net-scp
108
- net-ssh (>= 2.7, < 3.1)
109
- net-telnet
110
- sfl
111
70
  systemu (2.6.5)
112
71
  uuidtools (2.1.5)
113
72
  wmi-lite (1.0.0)
@@ -116,7 +75,7 @@ PLATFORMS
116
75
  ruby
117
76
 
118
77
  DEPENDENCIES
119
- chef (>= 12.1, < 12.2)
78
+ chef (= 12.0.3)
120
79
 
121
80
  BUNDLED WITH
122
81
  1.10.6
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.23
4
+ version: 12.5.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: files/bin
10
10
  cert_chain: []
11
- date: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2015-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake