macker 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -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(/,(?![\s])/, ', ')
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
@@ -3,5 +3,5 @@
3
3
  # Macker namespace
4
4
  module Macker
5
5
  # Macker version
6
- VERSION = '0.1.3'.freeze
6
+ VERSION = '0.1.4'.freeze
7
7
  end
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.3
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-24 00:00:00.000000000 Z
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/oui_1499162218.txt
82
+ - data/oui_1500995445.txt
83
83
  - lib/macker.rb
84
84
  - lib/macker/address.rb
85
85
  - lib/macker/config.rb