Sha256: 51e6c78db622443bd5bc54308c3d1bb2a20faa13805bf5615418dc9381da4fb2
Contents?: true
Size: 443 Bytes
Versions: 3
Compression:
Stored size: 443 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 method_missing(meth) ret = backend.run_command(commands.get_process(@name, :format => "#{meth.to_s}=")) val = ret[:stdout].strip val = val.to_i if val.match(/^\d+$/) val end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
serverspec-0.14.2 | lib/serverspec/type/process.rb |
serverspec-0.14.1 | lib/serverspec/type/process.rb |
serverspec-0.14.0 | lib/serverspec/type/process.rb |