compat_resource 12.5.7 → 12.5.8
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/LICENSE +1 -1
- data/README.md +34 -5
- data/files/lib/chef_compat/copied_from_chef/chef/property.rb +4 -1
- data/files/lib/chef_compat/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 251160e9fb7aff1f0dc619ee37bfe3e99a7013a7
|
|
4
|
+
data.tar.gz: 6f7fd9359ec25fd8e362af0a76148eb6b6d04c3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
-
|
|
4
|
-
|
|
3
|
+
[](https://travis-ci.org/chef-cookbooks/compat_resource)
|
|
4
|
+
[](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
|
-
|
|
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?(:
|
|
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)
|
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.
|
|
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
|
|
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
|
|
121
|
+
summary: Bring some new features of Chef 12.5 to previous 12.X releases
|
|
122
122
|
test_files: []
|