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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89fda8a6bf84dab6f3ac7cfd58f9705caea4db4a
4
- data.tar.gz: b3c43c3f7a542a55becb6808940f834b3c1e4339
3
+ metadata.gz: 973f7962c2f381a12ff7a080e3ad9238105c1666
4
+ data.tar.gz: 654b78b7c8e26698780ec9bb84566ee8adea38d9
5
5
  SHA512:
6
- metadata.gz: f013c36deef2e22a5c0f50ae0aa173e1db94b965785ac9ebc8f2de2526b1e6b9b4073453ef6f6c1ff9eecc6ff9d199e3df6f855e1e8c5e330426db107f5dcf12
7
- data.tar.gz: 09a83eabcf713c9a1e2102129a65821a8b448c83165cea308033d8dad14614b7bef79b1661325cdb67672c48f7d641c1868c3b05a18f1ab1d73db5f033bb5187
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 { |interface| mac, name = interface.split(/,/); [ clean(name), clean(mac) ] }
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
 
@@ -1,3 +1,3 @@
1
1
  module MacAddr
2
- VERSION = "1.8.2".freeze
2
+ VERSION = "1.8.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macaddr-steakknife
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
metadata.gz.sig CHANGED
Binary file