vipnet_parser 1.0.2 → 1.0.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: d108400ac90c0efc7e97eb1c4c3cef2da10c6e83
4
- data.tar.gz: 29ab3956c28adf40505d2ff2ab9f753e0998dd38
3
+ metadata.gz: d5c5241f638c3d35c981955f9192acc9920eca39
4
+ data.tar.gz: 4b749d623deaf05fcf21afe195be1f05c68859a1
5
5
  SHA512:
6
- metadata.gz: 3e428deb3547354d5aac8528c2c2594a6fb11a55d796436ffc40d62305000fff11bdbec4c096ae87697fd148f496f33edc4d322ed1e64dddd38a12b1884d60e8
7
- data.tar.gz: 6d5db605ef192b541cfbf0b7e8d70041ccb013204f8bb4a6ebfed0ec682e965e7a26d549f3c679f460845747a9f1d61d151a8c8199a783d96200f472eb8be328
6
+ metadata.gz: 9e966f520bbe3cccde867ab8a5c8a93ebc4221bfdfb30de32ba6edc658cc762226f546d7cfa14fd03aead1b667addc09e0f55f19a54e221393fe5d3a91dc102e
7
+ data.tar.gz: 97d3a90b289dd98a4865ef3c2fc608201a7587ba8aafbfe21a4beaee431a275136f2e458c12a13981098a78b0fa22a9d8880c6f5e57172e3ac3eac53932b6b70
@@ -35,7 +35,7 @@ module VipnetParser
35
35
 
36
36
  case format
37
37
  when :hash
38
- @hash = {}
38
+ @hash = { _meta: { version: "1" }}
39
39
  hash_keys = {
40
40
  id: :id,
41
41
  adapter: :name,
@@ -16,7 +16,7 @@ module VipnetParser
16
16
 
17
17
  case format
18
18
  when :hash
19
- @hash = {}
19
+ @hash = { _meta: { version: "1" }, id: {} }
20
20
 
21
21
  string.split("\r\n").each do |line|
22
22
  record = _record_hash(line)
@@ -25,7 +25,7 @@ module VipnetParser
25
25
  record[:category] = { "A" => :client, "S" => :server, "G" => :group }[record[:category]]
26
26
  normal_id = VipnetParser::id(record[:id]).first
27
27
  record.delete(:id)
28
- @hash[normal_id] = record
28
+ @hash[:id][normal_id] = record
29
29
  end
30
30
 
31
31
  return @hash
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vipnet_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Morozov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-19 00:00:00.000000000 Z
11
+ date: 2016-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Parses ViPNet IDs, iplir.conf and other files
14
14
  email: ntcomp12@gmail.com