summaryrefslogtreecommitdiff
path: root/lib/chef/util/dsc
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-12-17 08:57:33 -0800
committerTim Smith <tsmith84@gmail.com>2021-12-17 08:57:33 -0800
commit06c650886daa2a6eaf4c029cbf686ff401d44c48 (patch)
tree414a5bc2f8c7a5f07702a01c3fcb71b67026f189 /lib/chef/util/dsc
parentdf9b3881518297274bebfac3c348d69f3de52197 (diff)
downloadchef-06c650886daa2a6eaf4c029cbf686ff401d44c48.tar.gz
Simplify file readssimplified_read
This is a new RuboCop cop that moves things to file.read an file.binread vs. an open and then a read. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/util/dsc')
-rw-r--r--lib/chef/util/dsc/configuration_generator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/util/dsc/configuration_generator.rb b/lib/chef/util/dsc/configuration_generator.rb
index 8ca6249a9d..ae3c5c951d 100644
--- a/lib/chef/util/dsc/configuration_generator.rb
+++ b/lib/chef/util/dsc/configuration_generator.rb
@@ -175,7 +175,7 @@ class Chef::Util::DSC
end
def get_configuration_document(document_path)
- ::File.open(document_path, "rb", &:read)
+ ::File.binread(document_path)
end
end
end