compat_resource 12.5.7 → 12.5.8

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: 25e72c39ecf18932dea010bcf587acf785ccbe8d
4
- data.tar.gz: e017d091bb638f0e5ee752b1256ed3f930f1c912
3
+ metadata.gz: 251160e9fb7aff1f0dc619ee37bfe3e99a7013a7
4
+ data.tar.gz: 6f7fd9359ec25fd8e362af0a76148eb6b6d04c3a
5
5
  SHA512:
6
- metadata.gz: d33c75da3765cdab6ab48d487b8e4445e7513063e967ee528a845e4220888bce91954140b502edd771346e3c0f5a5847ce622e33c9cf84364e192fce8e31843e
7
- data.tar.gz: 33d70dd15a3ec91d176a6df06f73f2f0395c09db26ba2217e579c8659cffb99330fafe56dd87492244c6d8319210092c236c87c7fef4d8cf23a08b31bb5f598f
6
+ metadata.gz: 4eedb7a07b765e628172908e2e6cdb2613600ef28bdb260ac358a112b5e14c4e1ebf6347f4e8316018f9bc40c1b7be3b8c1796e4fdd4e37c184f1dd512775f54
7
+ data.tar.gz: af54f823c72d29fe1879262c32426f5b36e6602b85a3d24d83a17721ac5912367161d35f2de6177cc6fd4d639136316cc11d2de7d43194ee915dea388f12f992
data/LICENSE CHANGED
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2008-2015 Chef Software Inc.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,9 +1,23 @@
1
1
  # compat_resource cookbook
2
2
 
3
- This cookbook brings the custom resource syntax from Chef 12.5 down to earlier
4
- versions (12.0-12.5).
3
+ [![Build Status](https://travis-ci.org/chef-cookbooks/compat_resource.svg?branch=master)](https://travis-ci.org/chef-cookbooks/compat_resource)
4
+ [![Cookbook Version](https://img.shields.io/cookbook/v/compat_resource.svg)](https://supermarket.chef.io/cookbooks/compat_resource)
5
+
6
+
7
+ This cookbook brings the custom resource syntax from Chef 12.5 to earlier Chef 12.X releases.
8
+
9
+
10
+ Requirements
11
+ ------------
12
+ #### Platforms
13
+ - All platforms supported by Chef
14
+
15
+ #### Chef
16
+ - Chef 12.0+
17
+
18
+ #### Cookbooks
19
+ - none
5
20
 
6
- This cookbook is early days. It has some [travis tests](https://travis-ci.org/jkeiser/compat_resource) verifying the test matrix of rubies and chef versions.
7
21
 
8
22
  ## Usage
9
23
 
@@ -18,6 +32,21 @@ Curious about how to use custom resources? Here are the 12.5 docs:
18
32
  - Docs: https://docs.chef.io/custom_resources.html
19
33
  - Slides: https://docs.chef.io/decks/custom_resources.html
20
34
 
21
- ## Contributing
22
35
 
23
- Try it! [File issues](https://github.com/jkeiser/compat_resource/issues) or fork and submit a pull request at https://github.com/jkeiser/compat_resource if you see issues.
36
+ ##License & Authors
37
+
38
+ **Author:** John Keiser (<jkeiser@chef.io>)
39
+
40
+ **Copyright:** 2015, Chef Software, Inc.
41
+ ```
42
+ Licensed under the Apache License, Version 2.0 (the "License");
43
+ you may not use this file except in compliance with the License.
44
+ You may obtain a copy of the License at
45
+
46
+ http://www.apache.org/licenses/LICENSE-2.0
47
+
48
+ Unless required by applicable law or agreed to in writing, software
49
+ distributed under the License is distributed on an "AS IS" BASIS,
50
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
+ See the License for the specific language governing permissions and
52
+ limitations under the License.
@@ -483,6 +483,8 @@ super if defined?(::Chef::Property)
483
483
  # A type accepts nil explicitly if "is" allows nil, it validates as nil, *and* is not simply
484
484
  # an empty type.
485
485
  #
486
+ # A type is presumed to accept nil if it does coercion (which must handle nil).
487
+ #
486
488
  # These examples accept nil explicitly:
487
489
  # ```ruby
488
490
  # property :a, [ String, nil ]
@@ -514,7 +516,8 @@ super if defined?(::Chef::Property)
514
516
  #
515
517
  # @api private
516
518
  def explicitly_accepts_nil?(resource)
517
- options.has_key?(:is) && resource.send(:_pv_is, { name => nil }, name, options[:is], raise_error: false)
519
+ options.has_key?(:coerce) ||
520
+ (options.has_key?(:is) && resource.send(:_pv_is, { name => nil }, name, options[:is], raise_error: false))
518
521
  end
519
522
 
520
523
  def get_value(resource)
@@ -1,3 +1,3 @@
1
1
  module ChefCompat
2
- VERSION = '12.5.7' if !defined?(VERSION)
2
+ VERSION = '12.5.8' if !defined?(VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compat_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.5.7
4
+ version: 12.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Bring some new features of Chef to older versions
69
+ description: Bring some new features of Chef 12.5 to previous 12.X releases
70
70
  email: john@johnkeiser.com
71
71
  executables: []
72
72
  extensions: []
@@ -118,5 +118,5 @@ rubyforge_project:
118
118
  rubygems_version: 2.4.5
119
119
  signing_key:
120
120
  specification_version: 4
121
- summary: Bring some new features of Chef to older versions
121
+ summary: Bring some new features of Chef 12.5 to previous 12.X releases
122
122
  test_files: []