sloe 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/sloe/junos.rb CHANGED
@@ -10,7 +10,8 @@ module Sloe
10
10
 
11
11
  def cli(cmd_str, attrs = { :format => 'text' })
12
12
  attrs[:format] ||= 'text'
13
- self.rpc.command(cmd_str, attrs).text
13
+ reply = self.rpc.command(cmd_str, attrs)
14
+ reply.respond_to?(:text) ? reply.text : reply
14
15
  end
15
16
  end
16
17
  end
data/lib/sloe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sloe
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
data/spec/methods_spec.rb CHANGED
@@ -77,5 +77,8 @@ describe Sloe do
77
77
  @dut.cli("show version", :foo => 'bar').should be_a(String)
78
78
  @dut.cli("show version", :foo => 'bar').should =~ /JUNOS Base OS/
79
79
  end
80
+ it "cli('clear interface statistics') empty reply does not cause an error" do
81
+ lambda { @dut.cli('clear interface statistics fxp0') }.should_not raise_error
82
+ end
80
83
  end
81
84
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sloe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: snmp