lib/oxidized/model/zhoneolt.rb in oxidized-0.21.0 vs lib/oxidized/model/zhoneolt.rb in oxidized-0.22.0

- old
+ new

@@ -16,11 +16,11 @@ cfg.gsub! /^(set communityname = ) \S+/, '\\1 <removed>' cfg end cmd :all do |cfg| - cfg.each_line.to_a[1..-2].map{|line|line.delete("\r").rstrip}.join("\n") + "\n" + cfg.each_line.to_a[1..-2].map { |line| line.delete("\r").rstrip }.join("\n") + "\n" end cmd 'swversion' do |cfg| comment cfg end @@ -37,10 +37,10 @@ cfg = cfg.each_line.select { |line| line.match /Vendor (Name|OUI|Part|Revision)|Serial Number|Manufacturing Date/ }.join comment cfg end cmd 'dump console' do |cfg| - cfg = cfg.each_line.select { |line| not line.match /To Abort the operation enter Ctrl-C/ }.join + cfg = cfg.each_line.reject { |line| line.match /To Abort the operation enter Ctrl-C/ }.join end # zhone technically supports ssh, but it locks up a ton. Especially when # showing large amounts of output, like "dump console" cfg :telnet do