lib/oxidized/model/fabricos.rb in oxidized-0.25.1 vs lib/oxidized/model/fabricos.rb in oxidized-0.26.0
- old
+ new
@@ -4,10 +4,10 @@
prompt /^([\w]+:+[\w]+[>]\s)$/
comment '# '
cmd 'chassisShow' do |cfg|
- comment cfg.each_line.reject { |line| line.match /Time Awake:/ or line.match /Power Usage \(Watts\):/ or line.match /Time Alive:/ or line.match /Update:/ }.join
+ comment cfg.each_line.reject { |line| line.match(/Time Awake:/) || line.match(/Power Usage \(Watts\):/) || line.match(/Time Alive:/) || line.match(/Update:/) }.join
end
cmd 'configShow -all' do |cfg|
cfg = cfg.each_line.reject { |line| line.match /date = / }.join
cfg