summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 12:37:48 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 12:37:48 +0000
commit3dd9062d866266e1940bbf84b1ca5a63482cdadb (patch)
treed19897e9d5e8f3fc7a1f4d232ec7ff6a4bebd99b /lib/custodian/protocoltest
parent90070510d4b3913e3f18e05e57c9b5a3170adde5 (diff)
File.exists? is deprecated.
We prefer "File.exist?". Flagged by rubocop.
Diffstat (limited to 'lib/custodian/protocoltest')
-rw-r--r--lib/custodian/protocoltest/ping.rb2
-rw-r--r--lib/custodian/protocoltest/smtprelay.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/protocoltest/ping.rb b/lib/custodian/protocoltest/ping.rb
index 37722c2..937a5db 100644
--- a/lib/custodian/protocoltest/ping.rb
+++ b/lib/custodian/protocoltest/ping.rb
@@ -71,7 +71,7 @@ module Custodian
#
binary = nil
binary = "./bin/multi-ping"
- binary = "/usr/bin/multi-ping" if ( File.exists?( "/usr/bin/multi-ping" ) )
+ binary = "/usr/bin/multi-ping" if ( File.exist?( "/usr/bin/multi-ping" ) )
if ( binary.nil? )
@error = "Failed to find '/usr/bin/multi-ping'"
diff --git a/lib/custodian/protocoltest/smtprelay.rb b/lib/custodian/protocoltest/smtprelay.rb
index 7cf22cc..85f7896 100644
--- a/lib/custodian/protocoltest/smtprelay.rb
+++ b/lib/custodian/protocoltest/smtprelay.rb
@@ -63,7 +63,7 @@ module Custodian
def get_hostname
hostname = "localhost.localdomain"
- if ( File.exists?( "/etc/hostname" ) )
+ if ( File.exist?( "/etc/hostname" ) )
File.readlines("/etc/hostname" ).each do |line|
hostname = line if ( !line.nil? )
hostname.chomp!