kvx 0.9.6 → 0.9.7

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 +0 -0
  4. data/lib/kvx.rb +11 -7
  5. metadata +3 -2
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ddaef947e49b210dbee31fcf56ec84e3644681c6a790c9ec80cb9fe314cd9d8
4
- data.tar.gz: 56fae3981651c158701eb34023477125fbe7dd0ee8421d49d0e15174f550aae4
3
+ metadata.gz: '03690b30a2cce31295d0d6eeffc8c142785ab25efb0bad30328a41121d0f1e28'
4
+ data.tar.gz: d16ee75eb0d6aec1641b9b1a544e459623195889860f579414f8b338151cdb08
5
5
  SHA512:
6
- metadata.gz: fd452778a00be2a43d078b61ffdbb2616c1b631a0a1806c6027453c739b755ac90c7cd7e804ee6fe0839dae01d083d02abbffb7900e54fa6b7ba6159abee3248
7
- data.tar.gz: 27c99e9368bc2dfd7cd49527eed157a31a9e2a2bd3d8caaf357fb12c1c5ccf898dc8913a963fdb2594eacf660054403302bc9425b54dfc46e06b588565ed9dd7
6
+ metadata.gz: 0e5cfff4834e5f080f983608178807c0483db5073cb158cc64ccc1b95b05bd0dd2afe7d0e25dbcafb8648d08ea1b803c6f914e1907bc5f264a8c5510d05262b2
7
+ data.tar.gz: c8d3f742947f5dd4f10a54223ffb27b09c131d36ff443f2b2790120b16a570a9e253cf1677fd88f637158d0c3ee2f87d720530dd08655c17edb9f9854376cb05
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/kvx.rb CHANGED
@@ -353,13 +353,14 @@ class Kvx
353
353
  # if there are any orphan lines which aren't nested underneath a
354
354
  # label, they will be fixed using the following statement
355
355
 
356
- a = raw_a.chunk {|x| x[0][/^[^:]+:|.*/]}.inject([]) do |r,y|
356
+ a = raw_a.chunk {|x| x[0][/^[^:]+:/]}.inject([]) do |r,y|
357
357
 
358
358
  puts 'r: ' + r.inspect if @debug
359
359
 
360
360
  if r.last and !y.first[/[^:]+:/] then
361
361
  r.last << y.last[-1]
362
362
  else
363
+ puts 'y: ' + y.inspect if @debug
363
364
  r << y.last[-1]
364
365
  end
365
366
 
@@ -372,13 +373,16 @@ class Kvx
372
373
  s = line.shift
373
374
  puts ('s: ' + s.inspect).debug if @debug
374
375
 
375
- if line.join.length > 0 then
376
-
377
- r2 = if line[0][0][/^[^:]+:/] then
378
-
379
- padding = line[0].length < 2 ? "\n" : "\n "
376
+ if line.join.length > 0 then
377
+
378
+ puts 'line: ' + line.inspect if @debug
379
+
380
+ padding = line[0].length < 2 ? "\n" : "\n "
381
+ s10 = line.map{|x| x.join(padding)}.join("\n")
382
+
383
+ r2 = if s10[/^[^:]+:[\n ]/] then
380
384
 
381
- scan_to_h(line.map{|x| x.join(padding)}.join("\n"))
385
+ scan_to_h(s10)
382
386
 
383
387
  else
384
388
 
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.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -103,7 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.0.3
106
+ rubyforge_project:
107
+ rubygems_version: 2.7.10
107
108
  signing_key:
108
109
  specification_version: 4
109
110
  summary: Kvx (Keys, Values, and XML) makes it convenient to store and retrieve the
metadata.gz.sig CHANGED
Binary file