Sha256: bddc0ce37c3b17fdc24001b4d0d40da63d41281cf76dea044bb423ec4cef1298
Contents?: true
Size: 592 Bytes
Versions: 22
Compression:
Stored size: 592 Bytes
Contents
module Serverspec module Type class Process < Base def running? pid = backend.run_command(commands.get_process(@name, :format => "pid=")).stdout not pid.empty? end def user get_column("user") end def group get_column("group") end def method_missing(meth) get_column(meth.to_s) end def get_column(keyword) ret = backend.get_process(@name, :format => "#{keyword}=") val = ret.stdout.strip val = val.to_i if val.match(/^\d+$/) val end end end end
Version data entries
22 entries across 22 versions & 1 rubygems