snmp-open 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '09dd63241e17dc715dc949d0b727f61e777cfade'
4
- data.tar.gz: a3bf4afbcb4debc166bbc04b0c67292d41a63a12
3
+ metadata.gz: db7e18f61349f692d1543dcfe02ae4e2bc9bab34
4
+ data.tar.gz: 37598b9ab5c8797bd2227eac71da7e8e945ddca7
5
5
  SHA512:
6
- metadata.gz: bdf0ce08cdc82f961165108a9ea267011cf65c84c34b9ff944d91650ea9ea13bdc413f83346115041b1e6797509a3bda4a823e34de8b02c912587d071b3856f4
7
- data.tar.gz: 402b3e552a7c41ffe6f33b48f8c62e42ab79a1775540068304579f3babcaf0309b7d17b8cb4a7b4c195ea0d35ba52d103259e37ec02c54ea6c4c04ea97d6eb8f
6
+ metadata.gz: f7dc1bf3650a77fcce40e30ed2c9d6a7ac4f248e91adfac6e1358f5455e06cb045f44be5d9167287a9de4aef13843147a14f41e6b5cf962840deef5f8ae57a09
7
+ data.tar.gz: cf03e2bb2dc6509afe2991e8f0aaf02a4a262cefd0bc1ca733da93024d8006272177126e223aa861aaffda6ba750596bac90bb96a721fbde6d3467c919b173fe
@@ -35,7 +35,7 @@ module SNMP
35
35
 
36
36
  private
37
37
 
38
- def table(columns)
38
+ def align(columns)
39
39
  indexes = columns.first.map { |value| index_using_first_oid(value) }
40
40
  hash = columns.flat_map { |row| row.map { |v| [v.oid, v] } }.to_h
41
41
 
@@ -100,6 +100,14 @@ module SNMP
100
100
  end
101
101
  end
102
102
 
103
+ def table(columns)
104
+ if columns.size == 1 && columns.all? { |column| column.size == 1 }
105
+ columns
106
+ else
107
+ align(columns)
108
+ end
109
+ end
110
+
103
111
  def indexes(columns)
104
112
  indexes = SortedSet.new
105
113
  @oids.zip(columns).each do |oid, column|
@@ -1,5 +1,5 @@
1
1
  module Snmp
2
2
  module Open
3
- VERSION = '0.3.0'.freeze
3
+ VERSION = '0.3.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snmp-open
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Miller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler