lib/nephos-server/bin-helpers.rb in nephos-server-0.6.9 vs lib/nephos-server/bin-helpers.rb in nephos-server-0.7.0

- old
+ new

@@ -12,11 +12,11 @@ # note: if the Gemfile includes nephos and not nephos-server, # it will work anyway, because nephos require nephos-server def self.is_a_valid_application? dir="." return false if not Dir.exists? dir gfl = File.expand_path "Gemfile.lock", dir - return false if not File.exists? gfl + return false if not File.exist? gfl return false if not File.read(gfl).split.index("nephos-server") return true end module Daemon @@ -47,10 +47,10 @@ def self.get_pid_file return ".pid" end def self.get_pid - return nil if not File.exists?(get_pid_file) + return nil if not File.exist?(get_pid_file) v = File.read(get_pid_file) v = Integer(v) rescue nil return v end