summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-10 12:12:29 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-10 12:12:29 -0700
commit17115006b4bf6051976d8bb2d59db098413daee1 (patch)
treedcf9ff51afcfde1f506932a4e8029051c802fa9c /lib
parent3060db60b9b1f8239cb5df39de4217acfbfd6d58 (diff)
downloadchef-17115006b4bf6051976d8bb2d59db098413daee1.tar.gz
Add description / introduced and require plist
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/plist.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/resource/plist.rb b/lib/chef/resource/plist.rb
index 220cfc7a1f..e6651fe79d 100644
--- a/lib/chef/resource/plist.rb
+++ b/lib/chef/resource/plist.rb
@@ -16,6 +16,7 @@
# limitations under the License.
#
require_relative "../resource"
+require "plist"
class Chef
class Resource
@@ -25,6 +26,9 @@ class Chef
provides :plist
+ description "Use the plist resource to set config values in plist files on macOS systems."
+ introduced "16.0"
+
property :path, String, name_property: true
property :entry, String
property :value, [TrueClass, FalseClass, String, Integer, Float, Hash]
@@ -185,7 +189,7 @@ class Chef
if value.class == Hash
plutil_output = shell_out(plutil_executable, "-extract", entry, "xml1", "-o", "-", path).stdout.chomp
- { key_type: data_type, key_value: Plist.parse_xml(plutil_output) }
+ { key_type: data_type, key_value: ::Plist.parse_xml(plutil_output) }
else
defaults_read_output = shell_out(defaults_executable, "read", path, entry).stdout
{ key_type: data_type, key_value: defaults_read_output.strip }