macker 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d0c0d15ee568556fb71192954777cc610c64ba2
4
- data.tar.gz: d27337e0c47f8ec1102507ee80a6497faa5b3b6d
3
+ metadata.gz: a61388115edde7abbc459f193620b9665e9facfe
4
+ data.tar.gz: a2d87dca73e3b5002dd615da71ffbdd444912e40
5
5
  SHA512:
6
- metadata.gz: 187a1d6e9dbe7617fdc0f219f2cae20245a980df652a39e026de84d1c02c42355580975ba10a23432bfb8284c06447fd5c53eff003e5d10cb37701d4212f2c5f
7
- data.tar.gz: ea183544c180044f79e3db159865c09907bec9b12b1b0cb4c9d7d99d3bab0584f7beccd0ec8be829a25b2aea327fe29a3caa7b7ac798c70300377052c869e28c
6
+ metadata.gz: fbb1ab031f467e49e877c1cb1d42956b32d80bdced57584b3e1ec3490c7a0ad4525d376a6cecdd67f851846104ffe0f5f05fd08658ac7fb9baf09fe83613b7da
7
+ data.tar.gz: 2094c183ff2e8feee9940ee058d1d0b4026c8f509bd945c140e92929c66742769a976522196d19a6df1d8cba095a663d41e0e25715fa9071bbae4253f15fafdc
data/README.md CHANGED
@@ -43,11 +43,11 @@ The following configuration is the default configuration of Macker. Store the co
43
43
  Rails users can create a file `macker.rb` in `config/initializers` to load the own Macker configuration.
44
44
 
45
45
  ```ruby
46
- Maker.configure do |config|
47
- config.oui_full_url = 'http://linuxnet.ca/ieee/oui.txt', # Full URL of OUI text file
48
- config.user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0', # A common user agent
49
- config.ttl_in_seconds = 86_400, # Will expire the vendors in one day
50
- config.cache = File.expand_path(File.dirname(__FILE__) + '/../../data/oui_*.txt'), # Can be a string, pathname or proc
46
+ Macker.configure do |config|
47
+ config.oui_full_url = 'http://linuxnet.ca/ieee/oui.txt' # Full URL of OUI text file
48
+ config.user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0' # A common user agent
49
+ config.ttl_in_seconds = 86_400 # Will expire the vendors in one day
50
+ config.cache = File.expand_path(File.dirname(__FILE__) + '/../../data/oui_*.txt') # Can be a string, pathname or proc
51
51
  config.auto_expiration = true # Expiration can be checked manually
52
52
  end
53
53
  ```
@@ -396,17 +396,13 @@ module Macker
396
396
  { name: base16_fields[-1]
397
397
  .strip
398
398
  .gsub(/\s+/, ' ')
399
- .split(/ |\_|\-/)
400
- .map(&:capitalize)
401
- .join(' '),
399
+ .sub(/^./, &:upcase),
402
400
  address: address[2..-1].map { |a| a
403
401
  .strip
404
402
  .gsub(/\s+/, ' ')
405
403
  .gsub(/,(?![\s])/, ', ')
406
404
  .gsub(/\,+$/, '')
407
- .split(/ |\_|\-/)
408
- .map(&:capitalize)
409
- .join(' ')
405
+ .sub(/^./, &:upcase)
410
406
  },
411
407
  iso_code: iso_code.length == 2 ? iso_code.upcase : nil
412
408
  }
@@ -3,5 +3,5 @@
3
3
  # Macker namespace
4
4
  module Macker
5
5
  # Macker version
6
- VERSION = '0.1.2'.freeze
6
+ VERSION = '0.1.3'.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.2
4
+ version: 0.1.3
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-04 00:00:00.000000000 Z
11
+ date: 2017-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake