macker 0.1.3 → 0.1.4
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_1499162218.txt → oui_1500995445.txt} +1560 -984
- data/lib/macker.rb +5 -3
- data/lib/macker/version.rb +1 -1
- metadata +3 -3
data/lib/macker.rb
CHANGED
@@ -334,7 +334,7 @@ module Macker
|
|
334
334
|
# Get remote content and store in cache
|
335
335
|
# @return [String] text content
|
336
336
|
def read_from_url
|
337
|
-
text = open_url
|
337
|
+
text = open_url.force_encoding(Encoding::UTF_8)
|
338
338
|
store_in_cache(text) if text && config.cache
|
339
339
|
text
|
340
340
|
end
|
@@ -396,12 +396,14 @@ module Macker
|
|
396
396
|
{ name: base16_fields[-1]
|
397
397
|
.strip
|
398
398
|
.gsub(/\s+/, ' ')
|
399
|
+
.gsub(/[,;](?![\s])/, ', ')
|
400
|
+
.gsub(/[,;]+$/, '')
|
399
401
|
.sub(/^./, &:upcase),
|
400
402
|
address: address[2..-1].map { |a| a
|
401
403
|
.strip
|
402
404
|
.gsub(/\s+/, ' ')
|
403
|
-
.gsub(
|
404
|
-
.gsub(
|
405
|
+
.gsub(/[,;](?![\s])/, ', ')
|
406
|
+
.gsub(/[,;]+$/, '')
|
405
407
|
.sub(/^./, &:upcase)
|
406
408
|
},
|
407
409
|
iso_code: iso_code.length == 2 ? iso_code.upcase : nil
|
data/lib/macker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Egon Zemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -79,7 +79,7 @@ files:
|
|
79
79
|
- LICENSE.txt
|
80
80
|
- README.md
|
81
81
|
- Rakefile
|
82
|
-
- data/
|
82
|
+
- data/oui_1500995445.txt
|
83
83
|
- lib/macker.rb
|
84
84
|
- lib/macker/address.rb
|
85
85
|
- lib/macker/config.rb
|