Skip to content

Commit e89753c

Browse files
committed
Fix Lint/DeprecatedClassMethods
Result of: rubocop --autocorrect --only Lint/DeprecatedClassMethods
1 parent 2f2b74d commit e89753c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/puppet/provider/ca/katello_ssl_tool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def existing_pubkey
4040
end
4141

4242
def deploy!
43-
if File.exists?(rpmfile)
43+
if File.exist?(rpmfile)
4444
# the rpm is available locally on the file system
4545
rpm('-Uvh', '--force', rpmfile)
4646
else

lib/puppet/provider/katello_ssl_tool.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def generate!
5959
def generate?
6060
return false unless resource[:generate]
6161
return true if resource[:regenerate]
62-
return true if File.exists?(update_file)
62+
return true if File.exist?(update_file)
6363
return files_to_generate.any? { |file| ! File.exist?(file) }
6464
end
6565

@@ -79,7 +79,7 @@ def files_to_deploy
7979
end
8080

8181
def deploy!
82-
if File.exists?(rpmfile)
82+
if File.exist?(rpmfile)
8383
if(system("rpm -q #{rpmfile_base_name} &>/dev/null"))
8484
rpm('-e', rpmfile_base_name)
8585
end
@@ -91,7 +91,7 @@ def deploy!
9191
end
9292

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

179179
def exists?
180-
return false unless File.exists?(resource[:path])
181-
return false unless File.exists?(source_path)
180+
return false unless File.exist?(resource[:path])
181+
return false unless File.exist?(source_path)
182182
expected_content_processed == current_content
183183
end
184184

lib/puppet/provider/key_bundle/katello_ssl_tool.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
Puppet::Type.type(:key_bundle).provide(:katello_ssl_tool, :parent => Puppet::Provider::KatelloSslTool::CertFile) do
44

55
def exists?
6-
return false unless File.exists?(resource[:path])
7-
return false unless File.exists?(privkey_source_path)
8-
return false unless File.exists?(pubkey_source_path)
6+
return false unless File.exist?(resource[:path])
7+
return false unless File.exist?(privkey_source_path)
8+
return false unless File.exist?(pubkey_source_path)
99
expected_content_processed == current_content
1010
end
1111

0 commit comments

Comments
 (0)