From f2da63369fcb754e3715091cc4fd2f93db42106e Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Tue, 27 Oct 2015 14:49:52 -0400 Subject: better test framework, more specs and Travis CI --- lib/oxidized/model/model.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/model/model.rb') diff --git a/lib/oxidized/model/model.rb b/lib/oxidized/model/model.rb index e0e3941..c95cc67 100644 --- a/lib/oxidized/model/model.rb +++ b/lib/oxidized/model/model.rb @@ -11,7 +11,8 @@ module Oxidized klass.instance_variable_set '@cfg', Hash.new { |h,k| h[k] = [] } klass.instance_variable_set '@procs', Hash.new { |h,k| h[k] = [] } klass.instance_variable_set '@expect', [] - klass.const_set :CFG, CFG + klass.instance_variable_set '@comment', nil + klass.instance_variable_set '@prompt', nil end def comment _comment='# ' return @comment if @comment -- cgit v1.2.1 From 26b02bf064c76d6ef7943016c798629810986092 Mon Sep 17 00:00:00 2001 From: Elvin Efendi Date: Mon, 23 Nov 2015 12:41:50 -0500 Subject: include executed command into output --- lib/oxidized/model/model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model/model.rb') diff --git a/lib/oxidized/model/model.rb b/lib/oxidized/model/model.rb index c95cc67..ca851e3 100644 --- a/lib/oxidized/model/model.rb +++ b/lib/oxidized/model/model.rb @@ -79,7 +79,7 @@ module Oxidized attr_accessor :input, :node def cmd string, &block - out = @input.cmd string + out = "====================== #{string} ======================\n" + @input.cmd(string) return false unless out self.class.cmds[:all].each do |all_block| out = instance_exec Oxidized::String.new(out), string, &all_block -- cgit v1.2.1