kvx 0.9.6 → 0.9.11
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 +0 -0
- data/lib/kvx.rb +16 -10
- metadata +9 -9
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fe4f150a49ff2f1c88b0cf28b7d24cbd04af9fc64cf7ea697fe0e29ab62a67b
|
4
|
+
data.tar.gz: c2ead702dcf44db16cb10a1866051ceb85d947870f491276c610acff2bf2c5be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abf623624bb8630caa32c5d1893013351e3ec328e188bca05343b51286376387c70006cc70ac265958e4b376b299bacf6578c9dab46113c8f36d98d1ae1422f1
|
7
|
+
data.tar.gz: 83e9dcbff011d65f72408f1b7b9ab681599eba0057e2ee3bc8b5e78a94a08afbb5b29e01214a08c7e0ee22847c4214398a826c4cd2183c24fae6142285731761
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/kvx.rb
CHANGED
@@ -336,7 +336,7 @@ class Kvx
|
|
336
336
|
|
337
337
|
lines = txt.gsub(/^-+$/m,'').lines.map do |line|
|
338
338
|
|
339
|
-
if not line[/^
|
339
|
+
if not line[/^ *[^:]+:|^ +/] then
|
340
340
|
indent + ' ' + line
|
341
341
|
else
|
342
342
|
indent = line[/^ +/] || ''
|
@@ -344,22 +344,25 @@ class Kvx
|
|
344
344
|
end
|
345
345
|
|
346
346
|
end
|
347
|
-
|
347
|
+
puts ('lines: ' + lines.inspect).debug if @debug
|
348
|
+
|
348
349
|
puts ('inside scan_to_h').info if @debug
|
349
|
-
raw_a = LineTree.new(lines.join.gsub(/(^-*$)|(
|
350
|
+
raw_a = LineTree.new(lines.join.gsub(/(^-*$)|(?<=\S) +#.*/,'').strip,
|
350
351
|
ignore_blank_lines: @ignore_blank_lines).to_a
|
351
352
|
puts ('raw_a: ' + raw_a.inspect).debug if @debug
|
352
353
|
|
353
354
|
# if there are any orphan lines which aren't nested underneath a
|
354
355
|
# label, they will be fixed using the following statement
|
355
356
|
|
356
|
-
a = raw_a.chunk {|x| x[0][/^[^:]
|
357
|
+
a = raw_a.chunk {|x| x[0][/^[^:]+:/]}.inject([]) do |r,y|
|
358
|
+
|
357
359
|
|
358
360
|
puts 'r: ' + r.inspect if @debug
|
359
361
|
|
360
362
|
if r.last and !y.first[/[^:]+:/] then
|
361
363
|
r.last << y.last[-1]
|
362
364
|
else
|
365
|
+
puts 'y: ' + y.inspect if @debug
|
363
366
|
r << y.last[-1]
|
364
367
|
end
|
365
368
|
|
@@ -372,13 +375,16 @@ class Kvx
|
|
372
375
|
s = line.shift
|
373
376
|
puts ('s: ' + s.inspect).debug if @debug
|
374
377
|
|
375
|
-
if line.join.length > 0 then
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
378
|
+
if line.join.length > 0 then
|
379
|
+
|
380
|
+
puts 'line: ' + line.inspect if @debug
|
381
|
+
|
382
|
+
padding = line[0].length < 2 ? "\n" : "\n "
|
383
|
+
s10 = line.map{|x| x.join(padding)}.join("\n")
|
384
|
+
|
385
|
+
r2 = if s10[/^ *\w+:[\n ]/] then
|
380
386
|
|
381
|
-
scan_to_h(
|
387
|
+
scan_to_h(s10)
|
382
388
|
|
383
389
|
else
|
384
390
|
|
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.9.
|
4
|
+
version: 0.9.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
m/+jxdgFjKKGxeZqunu9cp5ca9wSjjtKh/VA/3xZtPwokCa7vCMB+ZxUP0jvd++u
|
36
36
|
OTXy8k/zqddw/VfD/It1UUK4
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2021-
|
38
|
+
date: 2021-06-06 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: line-tree
|
@@ -61,22 +61,22 @@ dependencies:
|
|
61
61
|
name: rxfhelper
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 1.0.0
|
67
64
|
- - "~>"
|
68
65
|
- !ruby/object:Gem::Version
|
69
66
|
version: '1.0'
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.0.0
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 1.0.0
|
77
74
|
- - "~>"
|
78
75
|
- !ruby/object:Gem::Version
|
79
76
|
version: '1.0'
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.0.0
|
80
80
|
description:
|
81
81
|
email: james@jamesrobertson.eu
|
82
82
|
executables: []
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
106
|
+
rubygems_version: 3.1.2
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Kvx (Keys, Values, and XML) makes it convenient to store and retrieve the
|
metadata.gz.sig
CHANGED
Binary file
|