Sha256: d521efe65bff47708a13ab48a9a3b4ba2a4459038e5d08feac9b8f67e380c70a

Contents?: true

Size: 448 Bytes

Versions: 9

Compression:

Stored size: 448 Bytes

Contents

require 'json'
expect = JSON.parse(File.new('sample_configs/passthru/collectors/cat/collect_this.json').read)
expect.keys.each {|k| expect['cat|'+k] = expect.delete(k)}
expect = JSON.generate(expect)
return ->(m) {
  return if m['beep|beep'] # TODO complain if it beeps twice
  monitor.logger.debug expect
  monitor.logger.debug { JSON.generate(m) }
  if JSON.generate(m) == expect
    puts 'ok'
    monitor.stop
  else
    puts 'not ok'
  end
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
panoptimon-0.4.5 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.4.4 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.4.2 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.4.1 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.4.0 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.3.0 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.2.0 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.1.0 sample_configs/passthru/plugins/okcat/okcat.rb
panoptimon-0.0.2 sample_configs/passthru/plugins/okcat/okcat.rb