Sha256: a203813b6182af3991c763d45a6d361c1e63fb6c8cf62fa1acfdc067e3ffd7d8
Contents?: true
Size: 651 Bytes
Versions: 5
Compression:
Stored size: 651 Bytes
Contents
class Firebrick < Oxidized::Model using Refinements # Firebrick # prompt /\x0a\x1b\x5b\x32\x4b\x0d.*>\s/ cmd :all do |cfg| # remove arbitrary whitespace after commands. cfg.each_line.to_a[1..-2].drop_while { |e| e.match /^\s+$/ }.join end cmd 'show status' do |cfg| cfg.gsub! "Status", '' cfg.gsub! "------", '' cfg.gsub! /Uptime.*/, '' cfg.gsub! /Current time.*/, '' cfg.gsub! /RAM.*/, '' cfg.gsub! /Warranty.*/, '' comment cfg end cmd 'show configuration' cfg :telnet do username /Username:\s?/ password /Password:\s?/ end cfg :telnet, :ssh do pre_logout 'exit' end end
Version data entries
5 entries across 5 versions & 1 rubygems