Sha256: fd54e308e05747d9d92603d013834e07e1c28478f7c565f80615a9faf574bef1
Contents?: true
Size: 592 Bytes
Versions: 11
Compression:
Stored size: 592 Bytes
Contents
module Serverspec module Type class Process < Base def running? pid = @runner.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 = @runner.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
11 entries across 11 versions & 1 rubygems