summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file.rb
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-05-19 16:38:09 -0700
committerPete Higgins <pete@peterhiggins.org>2020-05-19 16:50:17 -0700
commite2a948c23a2622fccffd3a956d04b19bd147e19c (patch)
treee51fbe8919b8aafddb542ae6b6605f7c93374848 /lib/chef/resource/file.rb
parent060e9b734f16706f49e2ce53831531bc5b56dd86 (diff)
downloadchef-e2a948c23a2622fccffd3a956d04b19bd147e19c.tar.gz
Use a plain type for the ruby_type, move the regex to a validator.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
Diffstat (limited to 'lib/chef/resource/file.rb')
-rw-r--r--lib/chef/resource/file.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb
index 4816ada504..68affe5dbb 100644
--- a/lib/chef/resource/file.rb
+++ b/lib/chef/resource/file.rb
@@ -65,7 +65,8 @@ class Chef
property :backup, [ Integer, FalseClass ], desired_state: false, default: 5,
description: "The number of backups to be kept in `/var/chef/backup` (for UNIX- and Linux-based platforms) or `C:/chef/backup` (for the Microsoft Windows platform). Set to `false` to prevent backups from being kept."
- property :checksum, [ /^[a-zA-Z0-9]{64}$/, nil ],
+ property :checksum, [ String, nil ],
+ regex: /^\h{64}$/,
description: "The SHA-256 checksum of the file. Use to ensure that a specific file is used. If the checksum does not match, the file is not used."
property :content, [ String, nil ], desired_state: false,