compat_resource 12.7.3 → 12.8.0

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: ed268da9671b0afd05e7febfabc797b8e259675d
4
- data.tar.gz: e8eeaceb5f6707856a90c7b2c0d55549353afc5a
3
+ metadata.gz: a6fd0d2ca1ca0f62f0e064d99997a276cdc3434e
4
+ data.tar.gz: 7d48e84a1e2db8feee6aac0929f55b284500e6d9
5
5
  SHA512:
6
- metadata.gz: 0884d41c143edb61e2c4219f98983cbe379968d38d16a3606deba2180b9f4ee7d124d21eb2300864019b6fffb912704be6433dd813abb4be55ebad0827452fe3
7
- data.tar.gz: 88a8398a2276ab2fcf7b4e2f69a8ddf174576a6be0171a4b3fff28d262a909d4a624af5aba361cb47f5f01061ea711bab660aa48fd48dfb3f676817646b83707
6
+ metadata.gz: f782d62935ed677342fa443a1c791a4b32ac13fcf0a63d671ea1fea7dc9871fe3808fe4d7ac378a08e01de0301a5ac0c99e3520f5f13a8903364f3cf7eb7acbb
7
+ data.tar.gz: 631f9f2186847f5fd2bd3c95b63315def9280ed8e2dafb006f72e65a7262c480da3ff632d234012c65b27c3dd731991d33d48ea259a69ba4dd2b8e09d35e764c
@@ -109,7 +109,7 @@ class Chef < (defined?(::Chef) ? ::Chef : Object)
109
109
  run_context: run_context,
110
110
  cookbook_name: cookbook_name,
111
111
  recipe_name: recipe_name,
112
- enclosing_provider: self.is_a?(Chef::Provider) ? self : nil,
112
+ enclosing_provider: self.is_a?(Chef::Provider) ? self : nil
113
113
  ).build(&resource_attrs_block)
114
114
  end
115
115
  end
@@ -109,7 +109,8 @@ class Chef < (defined?(::Chef) ? ::Chef : Object)
109
109
  options.each { |k, v| options[k.to_sym] = v if k.is_a?(String) }
110
110
 
111
111
  options[:instance_variable_name] = :"@#{name}" if !options.has_key?(:instance_variable_name)
112
- options.merge!(name: name, declared_in: self)
112
+ options[:name] = name
113
+ options[:declared_in] = self
113
114
 
114
115
  if type == NOT_PASSED
115
116
  # If a type is not passed, the property derives from the
@@ -342,11 +342,11 @@ super if defined?(::Chef::Property)
342
342
  # It won't do what they expect. This checks whether you try to *read*
343
343
  # `content` while we are compiling the resource.
344
344
  if resource.respond_to?(:resource_initializing) &&
345
- resource.resource_initializing &&
346
- resource.respond_to?(:enclosing_provider) &&
347
- resource.enclosing_provider &&
348
- resource.enclosing_provider.new_resource &&
349
- resource.enclosing_provider.new_resource.respond_to?(name)
345
+ resource.resource_initializing &&
346
+ resource.respond_to?(:enclosing_provider) &&
347
+ resource.enclosing_provider &&
348
+ resource.enclosing_provider.new_resource &&
349
+ resource.enclosing_provider.new_resource.respond_to?(name)
350
350
  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}")
351
351
  end
352
352
 
@@ -492,8 +492,8 @@ super if defined?(::Chef::Property)
492
492
  # the original options.
493
493
  options = self.options
494
494
  if modified_options.has_key?(:name_property) ||
495
- modified_options.has_key?(:name_attribute) ||
496
- modified_options.has_key?(:default)
495
+ modified_options.has_key?(:name_attribute) ||
496
+ modified_options.has_key?(:default)
497
497
  options = options.reject { |k, v| k == :name_attribute || k == :name_property || k == :default }
498
498
  end
499
499
  self.class.new(options.merge(modified_options))
@@ -48,7 +48,7 @@ super if defined?(::Chef::Resource)
48
48
  arg.each do |action|
49
49
  validate(
50
50
  { action: action },
51
- { action: { kind_of: Symbol, equal_to: allowed_actions } },
51
+ { action: { kind_of: Symbol, equal_to: allowed_actions } }
52
52
  )
53
53
  end
54
54
  @action = arg
@@ -1,3 +1,3 @@
1
1
  module CompatResource
2
- VERSION = '12.7.3'
2
+ VERSION = '12.8.0'
3
3
  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.7.3
4
+ version: 12.8.0
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: 2016-02-19 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.4.5.1
167
+ rubygems_version: 2.6.1
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: Bring some new features of Chef 12.5 to previous 12.X releases