kvx 0.6.4 → 0.7.0
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +3 -2
- data/lib/kvx.rb +14 -6
- metadata +30 -31
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b4b824205c31857abfb58eedbd0862638f107ed
|
4
|
+
data.tar.gz: 9353d15c5e55cb18879280238a49ad124e2087c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab42de614e9212080a40ccd10fddeb3d36c351761b976f5730a5dfb9a58d4aa8ee9bd43728cb9ac3aa207aae77ec9ed141dba141af6c479a951bd5eeaf371ad9
|
7
|
+
data.tar.gz: 25b1936cb279771ae62613f8ac7cf8d2bacf99b12339887eceea0745fed2731d822173282a17de891869e2e124ecfe8187e5db229ba5f13a1a78825b13640f7b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
e����CU�T�)(FߦU�Z�� �7�P���<S��A��w�]ρ��xt9=�+;�E�n�q"9��}��)
|
2
|
+
�<
|
3
|
+
A���F<G�DD��-�E�7�Q�)��ez>�������ڕl��1a�n �nb/�XD �IJ�� �y�}�n"�k�AA��.��Vԧ���o4y��y��n����������2�[�*ة������a����}��b�c4c2�P�k0/1d[e�-��-0Lm��?u����x� ���
|
data/lib/kvx.rb
CHANGED
@@ -18,13 +18,14 @@ class Kvx
|
|
18
18
|
attr_accessor :attributes, :summary
|
19
19
|
attr_reader :to_h
|
20
20
|
|
21
|
-
def initialize(x, attributes: {})
|
21
|
+
def initialize(x, attributes: {}, debug: false)
|
22
22
|
|
23
23
|
@header = false
|
24
24
|
@identifier = 'kvx'
|
25
25
|
@summary = {}
|
26
|
+
@ignore_blank_lines ||= false
|
26
27
|
|
27
|
-
@attributes = attributes
|
28
|
+
@attributes, @debug = attributes, debug
|
28
29
|
|
29
30
|
h = {
|
30
31
|
hash: :passthru,
|
@@ -166,6 +167,7 @@ class Kvx
|
|
166
167
|
def parse_string(s)
|
167
168
|
|
168
169
|
buffer, type = RXFHelper.read(s)
|
170
|
+
puts 'buffer: ' + buffer.inspect if @debug
|
169
171
|
buffer.lstrip =~ /^<\?xml/ ? xml_to_h(Rexle.new(buffer).root) : parse_to_h(buffer)
|
170
172
|
|
171
173
|
end
|
@@ -223,9 +225,11 @@ class Kvx
|
|
223
225
|
|
224
226
|
def scan_to_h(txt)
|
225
227
|
|
228
|
+
puts 'inside scan_to_h' if @debug
|
226
229
|
raw_a = LineTree.new(txt.gsub(/(^-*$)|(#.*)/,'').strip,
|
227
|
-
ignore_blank_lines:
|
228
|
-
|
230
|
+
ignore_blank_lines: @ignore_blank_lines).to_a
|
231
|
+
puts 'raw_a: ' + raw_a.inspect if @debug
|
232
|
+
|
229
233
|
# if there are any orphan lines which aren't nested underneath a
|
230
234
|
# label, they will be fixed using the following statement
|
231
235
|
|
@@ -241,6 +245,7 @@ class Kvx
|
|
241
245
|
@body = a.inject({}) do |r, line|
|
242
246
|
|
243
247
|
s = line.shift
|
248
|
+
puts 's: ' + s.inspect
|
244
249
|
|
245
250
|
if line.join.length > 0 then
|
246
251
|
|
@@ -281,7 +286,10 @@ class Kvx
|
|
281
286
|
r.merge({name.to_sym => v})
|
282
287
|
end
|
283
288
|
|
284
|
-
end
|
289
|
+
end
|
290
|
+
|
291
|
+
puts '@body: ' + @body.inspect
|
292
|
+
@body
|
285
293
|
|
286
294
|
end
|
287
295
|
|
@@ -321,4 +329,4 @@ class Kvx
|
|
321
329
|
end
|
322
330
|
end
|
323
331
|
|
324
|
-
end
|
332
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kvx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,27 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
/
|
31
|
-
|
32
|
-
6LJYV84ZCOUsdw==
|
13
|
+
MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwNDA2MjIwMTQ1WhcN
|
15
|
+
MTkwNDA2MjIwMTQ1WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDAh9gI
|
17
|
+
JY9j0QfwC1bR4tcNYI0O+fQouNQmUOXbpn8Kj7vpgN+E7uiIob44X2/sdrdpNEBD
|
18
|
+
VHc40GyY8MeV4ZAxabI0cujuZWBplGSEuaVMZIF68irTdxD8zS4AN1RoLDqlXKm3
|
19
|
+
iQq/IEyLcZdvF5PhtiPWx7XLMRlQ+UA/dq7nfjopQlrr5AYrQgX6uFbEZPKcLLns
|
20
|
+
7KHEg0uTg8esp0gwEUx6Z6qcD3GkYvAXCkzKxUQ8i6nxuBYhocHpL794RFxRxhBu
|
21
|
+
mEyp2L3LeT+n1qjQDsqdPieEfCWERRv1ab8QIBciBWpdek++1fUvfZDT13Zn6O/p
|
22
|
+
kfHi71jZkBGVqLpxAgMBAAGjgYowgYcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
23
|
+
HQYDVR0OBBYEFPP7tS0MGMGFFJM1E5/10giZQ3l2MCYGA1UdEQQfMB2BG2dlbW1h
|
24
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTAmBgNVHRIEHzAdgRtnZW1tYXN0ZXJAamFt
|
25
|
+
ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBAEihaHzi13m4NDth/Df4
|
26
|
+
xsczpDYlyTCzq5rpMmzp6jmaLpi4tIEhNi8TtX/VMk7hEyAD7qek2RzAsvAfi0xO
|
27
|
+
Pe1NFWXXsBn3rkHSQXCb9VAAD+9IlhsUcNm8rvXbtCL/PSsZcQg7hUFrl8S+JsnP
|
28
|
+
JdyT5iPchQM8ZktTBfh+F6wSNXeXEIwp3Jn3RCj6RltP0VH5/GFys9gEo9TN699H
|
29
|
+
YA2KPSiCE5CgBXgTTFAFkcY4ko43ApKnluZK+jZmiMrepSoKZOTW6sK+v9ABnVmv
|
30
|
+
3jLvreiNd0YuFPcPe+esHvUwxhE00qsh/ZWy9pwic9ywLOFdKbCguhaIs0sbQ2d2
|
31
|
+
YoI=
|
33
32
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
33
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
35
34
|
dependencies:
|
36
35
|
- !ruby/object:Gem::Dependency
|
37
36
|
name: line-tree
|
@@ -39,40 +38,40 @@ dependencies:
|
|
39
38
|
requirements:
|
40
39
|
- - "~>"
|
41
40
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
41
|
+
version: '0.6'
|
43
42
|
- - ">="
|
44
43
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
44
|
+
version: 0.6.8
|
46
45
|
type: :runtime
|
47
46
|
prerelease: false
|
48
47
|
version_requirements: !ruby/object:Gem::Requirement
|
49
48
|
requirements:
|
50
49
|
- - "~>"
|
51
50
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
51
|
+
version: '0.6'
|
53
52
|
- - ">="
|
54
53
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
54
|
+
version: 0.6.8
|
56
55
|
- !ruby/object:Gem::Dependency
|
57
56
|
name: rxfhelper
|
58
57
|
requirement: !ruby/object:Gem::Requirement
|
59
58
|
requirements:
|
60
59
|
- - "~>"
|
61
60
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
61
|
+
version: '0.6'
|
63
62
|
- - ">="
|
64
63
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
64
|
+
version: 0.6.1
|
66
65
|
type: :runtime
|
67
66
|
prerelease: false
|
68
67
|
version_requirements: !ruby/object:Gem::Requirement
|
69
68
|
requirements:
|
70
69
|
- - "~>"
|
71
70
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
71
|
+
version: '0.6'
|
73
72
|
- - ">="
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
74
|
+
version: 0.6.1
|
76
75
|
description:
|
77
76
|
email: james@jamesrobertson.eu
|
78
77
|
executables: []
|
@@ -100,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
99
|
version: '0'
|
101
100
|
requirements: []
|
102
101
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.6.
|
102
|
+
rubygems_version: 2.6.13
|
104
103
|
signing_key:
|
105
104
|
specification_version: 4
|
106
105
|
summary: Kvx (Keys, Values, and XML) makes it convenient to store and retrieve the
|
metadata.gz.sig
CHANGED
Binary file
|