Sha256: 87386c0067fd64cf6af95ca05e12af815c3eb5cb7e1783b0e5a188a791e3a2c4
Contents?: true
Size: 722 Bytes
Versions: 32
Compression:
Stored size: 722 Bytes
Contents
module Serverspec class Filter def self.filter_subject example description_args = example.metadata[:example_group][:example_group][:description_args].join(' ') # Linux kernel parameters %w( abi crypto debug dev fs kernel net sunrpc vm ).each do |param| if description_args.match(/^#{param}\./) ret = backend(Serverspec::Commands::Base).run_command("/sbin/sysctl -q -n #{description_args}") val = ret[:stdout].strip val = val.to_i if val.match(/^\d+$/) subject = Serverspec::Subject.new subject.value(val) return subject end end example.metadata[:example_group][:description_args].join(' ') end end end
Version data entries
32 entries across 32 versions & 1 rubygems