Skip to content

Commit

Permalink
Fix Lint/DeprecatedClassMethods
Browse files Browse the repository at this point in the history
Result of:

    rubocop --autocorrect --only Lint/DeprecatedClassMethods
  • Loading branch information
ekohl committed Nov 7, 2023
1 parent e376bb5 commit fdb0287
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/ca/katello_ssl_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def existing_pubkey
end

def deploy!
if File.exists?(rpmfile)
if File.exist?(rpmfile)
# the rpm is available locally on the file system
rpm('-Uvh', '--force', rpmfile)
else
Expand Down
10 changes: 5 additions & 5 deletions lib/puppet/provider/katello_ssl_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def generate!
def generate?
return false unless resource[:generate]
return true if resource[:regenerate]
return true if File.exists?(update_file)
return true if File.exist?(update_file)
return files_to_generate.any? { |file| ! File.exist?(file) }
end

Expand All @@ -79,7 +79,7 @@ def files_to_deploy
end

def deploy!
if File.exists?(rpmfile)
if File.exist?(rpmfile)
if(system("rpm -q #{rpmfile_base_name} &>/dev/null"))
rpm('-e', rpmfile_base_name)
end
Expand All @@ -91,7 +91,7 @@ def deploy!
end

def needs_deploy?
if File.exists?(rpmfile)
if File.exist?(rpmfile)
# the installed version doesn't match the rpmfile
!system("rpm --verify -p #{rpmfile} &>/dev/null")
else
Expand Down Expand Up @@ -177,8 +177,8 @@ class CertFile < Puppet::Provider
commands :openssl => 'openssl'

def exists?
return false unless File.exists?(resource[:path])
return false unless File.exists?(source_path)
return false unless File.exist?(resource[:path])
return false unless File.exist?(source_path)
expected_content_processed == current_content
end

Expand Down
6 changes: 3 additions & 3 deletions lib/puppet/provider/key_bundle/katello_ssl_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Puppet::Type.type(:key_bundle).provide(:katello_ssl_tool, :parent => Puppet::Provider::KatelloSslTool::CertFile) do

def exists?
return false unless File.exists?(resource[:path])
return false unless File.exists?(privkey_source_path)
return false unless File.exists?(pubkey_source_path)
return false unless File.exist?(resource[:path])
return false unless File.exist?(privkey_source_path)
return false unless File.exist?(pubkey_source_path)
expected_content_processed == current_content
end

Expand Down

0 comments on commit fdb0287

Please sign in to comment.