diff options
author | Thom May <thom@may.lt> | 2017-11-15 10:08:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 10:08:29 +0000 |
commit | 193007c6d2b3fdf5d87e4a1d97ee7fdac80344f6 (patch) | |
tree | 87d80a27d77d1985dda13c13f6a91cfbbcc274b9 | |
parent | 933ba8f363ee6f38e49461563b1bd94a32257e63 (diff) | |
parent | 0762237c6deb110aad940e4514955ec07789e7c3 (diff) | |
download | chef-193007c6d2b3fdf5d87e4a1d97ee7fdac80344f6.tar.gz |
Merge pull request #6583 from thomasdziedzic/fix-warning
replace deprecated Dir.exists? with Dir.exist?
-rw-r--r-- | chef-config/lib/chef-config/path_helper.rb | 2 | ||||
-rw-r--r-- | spec/support/shared/functional/execute_resource.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb index e8a576c84f..c011c4f18a 100644 --- a/chef-config/lib/chef-config/path_helper.rb +++ b/chef-config/lib/chef-config/path_helper.rb @@ -235,7 +235,7 @@ module ChefConfig paths = paths.map { |home_path| home_path.gsub(path_separator, ::File::SEPARATOR) if home_path } # Filter out duplicate paths and paths that don't exist. - valid_paths = paths.select { |home_path| home_path && Dir.exists?(home_path.force_encoding("utf-8")) } + valid_paths = paths.select { |home_path| home_path && Dir.exist?(home_path.force_encoding("utf-8")) } valid_paths = valid_paths.uniq # Join all optional path elements at the end. diff --git a/spec/support/shared/functional/execute_resource.rb b/spec/support/shared/functional/execute_resource.rb index 4f7cea1cd1..1a14bb38c3 100644 --- a/spec/support/shared/functional/execute_resource.rb +++ b/spec/support/shared/functional/execute_resource.rb @@ -63,7 +63,7 @@ shared_context "a command that can be executed as an alternate user" do after do File.delete(script_output_path) if File.exists?(script_output_path) - Dir.rmdir(script_output_dir) if Dir.exists?(script_output_dir) + Dir.rmdir(script_output_dir) if Dir.exist?(script_output_dir) end end |