diff options
author | Tim Smith <tsmith@chef.io> | 2019-02-07 15:39:45 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2019-04-15 10:27:10 -0700 |
commit | 7423d578bf12afb7f51716ead6a22d597b4abfa5 (patch) | |
tree | 891e95144112a211dfa5d8f2063f50f514f4b2a0 /lib/chef/resource | |
parent | 49ca8ca5070d171b8d64d3158f93531ee0573c4b (diff) | |
download | chef-7423d578bf12afb7f51716ead6a22d597b4abfa5.tar.gz |
Add description fields
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/archive_file.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/chef/resource/archive_file.rb b/lib/chef/resource/archive_file.rb index 1c0a073dde..7d6910a090 100644 --- a/lib/chef/resource/archive_file.rb +++ b/lib/chef/resource/archive_file.rb @@ -29,28 +29,29 @@ class Chef provides :libarchive_file # legacy cookbook name introduced "15.0" + description "Use the archive_file resource to extract archive files to disk. This resource uses the libarchive library to extract multiple archive formats including tar, gzip, bzip, and zip formats." property :path, String, name_property: true, coerce: proc { |f| ::File.expand_path(f) }, - description: "" + description: "An optional property to set the file path to the archive to extract if it differs from the resource block's name." property :owner, String, - description: "" + description: "The owner of the extracted files" property :group, String, - description: "" + description: "The group of the extracted files" property :mode, [String, Integer], - description: "", + description: "The mode of the extracted files", default: "755" property :destination, String, - description: "", + description: "The file path to extract the archive file to.", required: true property :options, [Array, Symbol], - description: "", + description: "An array of symbols representing extraction flags. Example: :no_overwrite to prevent overwriting files on disk.", default: lazy { [] } # backwards compatibility for the legacy cookbook names @@ -58,6 +59,8 @@ class Chef alias_method :extract_to, :destination action :extract do + description "Extract and archive file." + require "fileutils" unless ::File.exist?(new_resource.path) |