kvx 0.6.4 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +3 -2
  4. data/lib/kvx.rb +14 -6
  5. metadata +30 -31
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2df63d5a006445b29a5fa9fd63ad6182528fae09
4
- data.tar.gz: 21db5cf3c6074ba715f4e4624224655eb06dca22
3
+ metadata.gz: 5b4b824205c31857abfb58eedbd0862638f107ed
4
+ data.tar.gz: 9353d15c5e55cb18879280238a49ad124e2087c9
5
5
  SHA512:
6
- metadata.gz: 29302c6486105715ea93b8338e85c2c96c422472b380182295564faf32528c3a96403b228fc1b8493b69aa0d010fe478fc18c665daa95f1e6f1d7ad158a0c045
7
- data.tar.gz: da94df925b2734d9f85bbb2c7fbc21649d199edbf87db02c635e453fa510ad51ac07dca1b121d02418a7cad06f1e9685cef890cb5995b8b9769735a5f9a2aebd
6
+ metadata.gz: ab42de614e9212080a40ccd10fddeb3d36c351761b976f5730a5dfb9a58d4aa8ee9bd43728cb9ac3aa207aae77ec9ed141dba141af6c479a951bd5eeaf371ad9
7
+ data.tar.gz: 25b1936cb279771ae62613f8ac7cf8d2bacf99b12339887eceea0745fed2731d822173282a17de891869e2e124ecfe8187e5db229ba5f13a1a78825b13640f7b
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- �Oo�+<��9"&�~����(�R����[X���&?x]�=�T���qK�g1%,8|�Y�� �4�M�*�(����гM8U���VUltfq�0'vs�q����ޣ���2G�K+#Q���fF}YX�"�����ʈr/fs��o@����ح+���%�&B��B4 ����
2
- �r�yOz������8�'/�E݋v���*q�a��>�:�98:�ݙI_�Ac?uA�ٗ��v����a�T7��7
1
+ e����CU�T�)(F ߦUZ�� 7�P�� �<S��A��w]ρ��xt 9=�+;�En�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: false).to_a
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.6.4
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
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE2MDcwMTEwMzYzMVoXDTE3MDcwMTEwMzYzMVowSDESMBAG
16
- A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
- EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAL7qqHqdkvRWC6PMeFi7kM/Uy81tPT/MaqxFA+k0dgblGIZ9lHz4GcVzpgsd
19
- RuXj8wgI5MbRvvBkAhSGDmzYyKctEKanz1FMDbkNmPhLfZGOY1YGwcucYe10Tgpm
20
- hVwFvZJy5oaljp440aBScPAVa8Ar5BNYPemdzcrDMzyIVUBaVfI5FMI3fQM0kBgV
21
- rEOl+q/I2ocmkxkzRD053DdUbZm4nk1t2GBFWC2pL9hObML3bv1rLonVF4q509JR
22
- uXHy1Y4iHvqGMJ9o2th2luhADh6iJTz/1vAzH3Ur7KIqgD98pIJgs4ZCNlSHhABe
23
- f82iZR8z3mV1qtrhDh/4szBhfeMCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
- DwQEAwIEsDAdBgNVHQ4EFgQUgOOgbWvjUmDVBBl/D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RFxRxhBu
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: 2017-06-07 00:00:00.000000000 Z
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.5'
41
+ version: '0.6'
43
42
  - - ">="
44
43
  - !ruby/object:Gem::Version
45
- version: 0.5.8
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.5'
51
+ version: '0.6'
53
52
  - - ">="
54
53
  - !ruby/object:Gem::Version
55
- version: 0.5.8
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.4'
61
+ version: '0.6'
63
62
  - - ">="
64
63
  - !ruby/object:Gem::Version
65
- version: 0.4.2
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.4'
71
+ version: '0.6'
73
72
  - - ">="
74
73
  - !ruby/object:Gem::Version
75
- version: 0.4.2
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.8
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