Sha256: 617c7cc5635debcd9ddbd02c7e458e693a20cb223ef1e22f12d3b44f37f80937
Contents?: true
Size: 697 Bytes
Versions: 14
Compression:
Stored size: 697 Bytes
Contents
module Spring module Client class Status < Command def self.description "Show current status." end def call if env.server_running? puts "Spring is running:" puts print_process env.pid application_pids.each { |pid| print_process pid } else puts "Spring is not running." end end def print_process(pid) puts `ps -p #{pid} -o pid= -o args=` end def application_pids candidates = `ps -A -o ppid= -o pid=`.lines candidates.select { |l| l =~ /^(\s+)?#{env.pid} / } .map { |l| l.split(" ").last } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems