diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 14:55:20 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 15:08:43 -0700 |
commit | 21189d25a9385aa9ff3368716824b8333475a08b (patch) | |
tree | d4316d70ff88b5a43ffff90d04bd789da51cf9d4 /lib/chef/knife/core/bootstrap_context.rb | |
parent | fb6c052ae6d58db2499cf04ef0595d1e06a4c13c (diff) | |
download | chef-21189d25a9385aa9ff3368716824b8333475a08b.tar.gz |
fix Style/PreferredHashMethods
absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the
floor of that gem is bumped up.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/knife/core/bootstrap_context.rb')
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index bb20780590..4e21564c52 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -45,7 +45,7 @@ class Chef end def validation_key - if @chef_config.has_key?(:validation_key) && + if @chef_config.key?(:validation_key) && File.exist?(File.expand_path(@chef_config[:validation_key])) IO.read(File.expand_path(@chef_config[:validation_key])) else @@ -105,14 +105,14 @@ class Chef # We configure :verify_api_cert only when it's overridden on the CLI # or when specified in the knife config. - if !@config[:node_verify_api_cert].nil? || knife_config.has_key?(:verify_api_cert) + if !@config[:node_verify_api_cert].nil? || knife_config.key?(:verify_api_cert) value = @config[:node_verify_api_cert].nil? ? knife_config[:verify_api_cert] : @config[:node_verify_api_cert] client_rb << %Q{verify_api_cert #{value}\n} end # We configure :ssl_verify_mode only when it's overridden on the CLI # or when specified in the knife config. - if @config[:node_ssl_verify_mode] || knife_config.has_key?(:ssl_verify_mode) + if @config[:node_ssl_verify_mode] || knife_config.key?(:ssl_verify_mode) value = case @config[:node_ssl_verify_mode] when "peer" :verify_peer |