forest-client 0.0.9 → 0.0.12
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.
- checksums.yaml +4 -4
- data/lib/forest-client/printer.rb +17 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afa0719742728c9d3e0b55a9acbdc73b4eedd2ed
|
4
|
+
data.tar.gz: ba23e2b9061431e8852a927cc57de90477f5c300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b98b75e57e0b8220bfb05fa1fd9c8fd51c6baa3bd7b894eaa49d06df9e84bfee8eb26bc93ce0e02b7274bc0d600659ef115a228a9dea80e7715c72ef8ac3b57c
|
7
|
+
data.tar.gz: 0a7479ddea3d2d8db152ac22152f24ddc33279c2aedbfddc5f25ba393fcf7347f64138e07c34d5f6e609b11c81c54ab2637656dcced20b26f30ae26288b5d467
|
@@ -170,15 +170,25 @@ module ForestClient
|
|
170
170
|
xfeed_dim = snmp_get("1.3.6.1.2.1.43.8.2.1.5.1.#{tray}")
|
171
171
|
dim_units = snmp_get("1.3.6.1.2.1.43.8.2.1.3.1.#{tray}")
|
172
172
|
|
173
|
-
if
|
174
|
-
feed_dim
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
173
|
+
if feed_dim.respond_to?(:to_i) && xfeed_dim.respond_to?(:to_i) && dim_units.respond_to?(:to_i)
|
174
|
+
if feed_dim > 0 && xfeed_dim > 0
|
175
|
+
if dim_units.to_i == 3
|
176
|
+
feed_dim = Float(feed_dim) / 10000
|
177
|
+
xfeed_dim = Float(xfeed_dim) / 10000
|
178
|
+
elsif dim_units.to_i == 4
|
179
|
+
feed_dim = Float(feed_dim) * 0.0000393700787
|
180
|
+
xfeed_dim = Float(xfeed_dim) * 0.0000393700787
|
181
|
+
end
|
182
|
+
end
|
179
183
|
end
|
180
184
|
|
181
|
-
capacity =
|
185
|
+
capacity = snmp_get("1.3.6.1.2.1.43.8.2.1.9.1.#{tray}")
|
186
|
+
|
187
|
+
if capacity.respond_to?(:to_i)
|
188
|
+
capacity = capacity.to_i
|
189
|
+
else
|
190
|
+
capacity = 0
|
191
|
+
end
|
182
192
|
|
183
193
|
trays.push({:name => name, :status => status, :y => feed_dim, :x => xfeed_dim, :capacity => capacity})
|
184
194
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Burwell
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: The LAN printer query agent for the Forest printer management system.
|
17
17
|
email: printer.fungineers@gmail.com
|