macaddr-steakknife 1.8.2 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/macaddr.rb +6 -2
- data/lib/macaddr/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 973f7962c2f381a12ff7a080e3ad9238105c1666
|
4
|
+
data.tar.gz: 654b78b7c8e26698780ec9bb84566ee8adea38d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec699f79fe8d226417175b104d7e34a09141ca3d01299d8fe0e360302606aae8cc37f5e117d833aac4637493d589be19e100f8ac61a6172854c81e5111fef346
|
7
|
+
data.tar.gz: 8d7f4a377314bfdb0d150eb1983dd6b84898aa78772a0b02b29539708ad3e8cd5852dbcb8f31a086b30d151a8a130f7b5300915064d7e58410686ed277249e07
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/macaddr.rb
CHANGED
@@ -77,14 +77,18 @@ module Mac
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def clean(arg)
|
80
|
-
arg.delete('"')
|
80
|
+
arg.delete('"') unless arg.nil?
|
81
81
|
end
|
82
82
|
|
83
83
|
def from_getmac
|
84
84
|
return [] unless Which.which 'getmac'
|
85
85
|
%x{getmac /fo CSV /nh}
|
86
86
|
.split(/\n/)
|
87
|
-
.collect
|
87
|
+
.collect do |interface|
|
88
|
+
mac, name = interface.split(/,/)
|
89
|
+
name, mac = clean(name), clean(mac)
|
90
|
+
[name, mac] if !name.nil?
|
91
|
+
end
|
88
92
|
.compact
|
89
93
|
end
|
90
94
|
|
data/lib/macaddr/version.rb
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|