linux_stat 1.0.0 → 1.0.1
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/linux_stat/usb.rb +1 -1
- data/lib/linux_stat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db083b3617b6bd52399fefd54f9ffa6719ba324ab6eaa9b51227a8ef13ad362
|
4
|
+
data.tar.gz: f15d91899cddb4063c301657468f0eba934d2d811eb4f4b185d0046476af9c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adabc35b035a90560b430376287a4dd2cdd4d143c68af3cc312fbf7cae102a300c362c62ed81e82b1a739c5a63372015036a5760d5ac967ce689ebc09d37b81f
|
7
|
+
data.tar.gz: 6a37fcea1b5550d3a20e13d4f392aa4a1c0003b687a56d28467df03204e9e4c4c848bf4214f3491f4674d3fdccfbd610331547dbbb4680acd2b7ec75bc8dbf3a
|
data/lib/linux_stat/usb.rb
CHANGED
@@ -132,7 +132,7 @@ module LinuxStat
|
|
132
132
|
# But if the information isn't available, it will return nil.
|
133
133
|
def count
|
134
134
|
@@sys_usb_readable ||= File.readable?('/sys/bus/usb/devices/')
|
135
|
-
return
|
135
|
+
return nil unless @@sys_usb_readable
|
136
136
|
|
137
137
|
Dir['/sys/bus/usb/devices/*/'.freeze].count { |x|
|
138
138
|
id_vendor_file = File.join(x, 'idVendor'.freeze)
|
data/lib/linux_stat/version.rb
CHANGED