diff --git a/CHANGELOG b/CHANGELOG index 2c89333..b4ecd83 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +* Wed Oct 18 2023 Steven Pritchard - 6.16.1 +- Replace calls to `File.exists?` with `File.exist?` for compatibility with + Ruby 3 + * Wed Oct 11 2023 Steven Pritchard - 6.16.0 - [puppetsync] Updates for Puppet 8 - These updates may include the following: diff --git a/lib/puppet/functions/ssh/autokey.rb b/lib/puppet/functions/ssh/autokey.rb index 146f191..c5743a1 100644 --- a/lib/puppet/functions/ssh/autokey.rb +++ b/lib/puppet/functions/ssh/autokey.rb @@ -71,7 +71,7 @@ def autokey(username, key_strength=nil, return_private=nil) end end - if ( !File.exists?("#{keydir}/#{username}") ) + if ( !File.exist?("#{keydir}/#{username}") ) begin Timeout::timeout(30) do Puppet::Util::Execution.execute("/usr/bin/ssh-keygen -N '' -q -t rsa -C '' -b #{key_strength} -f #{keydir}/#{username}") @@ -83,7 +83,7 @@ def autokey(username, key_strength=nil, return_private=nil) end end - if ( File.exists?("#{keydir}/#{username}.pub") ) + if ( File.exist?("#{keydir}/#{username}.pub") ) if return_private retval = File.read("#{keydir}/#{username}") else diff --git a/metadata.json b/metadata.json index be9aa2f..4184e94 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "simp-ssh", - "version": "6.16.0", + "version": "6.16.1", "author": "SIMP Team", "summary": "Manage ssh", "license": "Apache-2.0",