mac_vendor 0.0.1 → 0.0.2
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/data/oui.txt.gz +0 -0
- data/lib/mac_vendor.rb +3 -3
- data/mac_vendor.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f6334232b940a1ed682a84c45f6e9d18a80226e
|
4
|
+
data.tar.gz: b241199483f6f9e9f191bc0c6db7ac9a8ac73766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cbaa7ce6fb5738812a34c90b37e5438287ab779c0ef1427af2e1c7aa47c84784e8c2bf3c80ed2681426a104b6560325fd58d2b6eba8018118849203dc26228d
|
7
|
+
data.tar.gz: 7125781e97d6b965403a7a8e8632fcf5366bb78989e791eac16a0a22181041ff69d482b138c35f9a3fd9bbd32ab6fe35796fe0bc70b3e028596969ea8a1b447d
|
data/data/oui.txt.gz
CHANGED
Binary file
|
data/lib/mac_vendor.rb
CHANGED
@@ -43,7 +43,7 @@ class MacVendor
|
|
43
43
|
mac_prefix = normalize_prefix $1
|
44
44
|
lines = $2.strip.split("\t")
|
45
45
|
company_name = lines[0]
|
46
|
-
company_address = lines[1..-2].reject {|x| x == ''}
|
46
|
+
company_address = lines[1..-2].reject {|x| x.strip == ''}
|
47
47
|
|
48
48
|
return @prefix_cache[prefix] = {:name => company_name, :address => company_address}
|
49
49
|
end
|
@@ -56,9 +56,9 @@ class MacVendor
|
|
56
56
|
|
57
57
|
entries[1..-1].each do |entry|
|
58
58
|
base16_fields = entry.strip.split("\n")[1].split("\t")
|
59
|
-
mac_prefix = base16_fields[0][0..5]
|
59
|
+
mac_prefix = base16_fields[0].strip[0..5]
|
60
60
|
company_name = base16_fields[-1]
|
61
|
-
company_address = entry.strip.gsub("\t",'').split("\n")[2..-1]
|
61
|
+
company_address = entry.strip.gsub("\t",'').split("\n")[2..-1].map {|x| x.strip}
|
62
62
|
|
63
63
|
# This actually happens three times in the current dataset!
|
64
64
|
unless @prefix_cache[mac_prefix].nil?
|
data/mac_vendor.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'mac_vendor'
|
3
|
-
s.version = '0.0.
|
4
|
-
s.date = '2013-
|
3
|
+
s.version = '0.0.2'
|
4
|
+
s.date = '2013-11-12'
|
5
5
|
s.license = "MIT"
|
6
6
|
s.summary = "MAC address vendor lookup"
|
7
7
|
s.description = "Given a MAC address, lookup the vendor of the interface."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mac_vendor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Wiegley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Given a MAC address, lookup the vendor of the interface.
|
14
14
|
email: doug@uceem.com
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
48
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.0.
|
49
|
+
rubygems_version: 2.0.7
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: MAC address vendor lookup
|