kvx 1.1.2 → 1.1.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/kvx.rb +10 -2
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 9593cb5e316de67bd9d1f60da12863f2a7b723455292fd47b90414f432bde395
|
|
4
|
+
data.tar.gz: 4d9895d44ab99d29b047f9b6fc3befe12c48a1593e90e96d5ce56035be0f8efb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 752439f262e50697f9523030846b5c2ae8298ddce5abfc4478db06029594be76ca09679cd44f8ab43a8c8462b71dffe0cf5c9bd1d9744e19a9139d90e82aa85b
|
|
7
|
+
data.tar.gz: f851c04b8e76a5a39aa67463c48fbce12619d2d67a1fc7dff207eb501bbc187cad36715fb4da8e88b68dcbe6f12cab59f5e7299b8d29d45864fa714626fe19c8
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/kvx.rb
CHANGED
|
@@ -34,7 +34,8 @@ class Kvx
|
|
|
34
34
|
attr_accessor :attributes, :summary
|
|
35
35
|
attr_reader :to_h
|
|
36
36
|
|
|
37
|
-
def initialize(x=nil, summary: {}, body: {}, attributes: {},
|
|
37
|
+
def initialize(x=nil, summary: {}, body: {}, attributes: {},
|
|
38
|
+
comment_char: nil, debug: false)
|
|
38
39
|
|
|
39
40
|
@header = attributes.any?
|
|
40
41
|
@identifier = 'kvx'
|
|
@@ -42,6 +43,7 @@ class Kvx
|
|
|
42
43
|
@ignore_blank_lines ||= false
|
|
43
44
|
|
|
44
45
|
@attributes, @debug = attributes, debug
|
|
46
|
+
@comment_char = comment_char
|
|
45
47
|
|
|
46
48
|
h = {
|
|
47
49
|
hash: :passthru,
|
|
@@ -415,7 +417,13 @@ s = "
|
|
|
415
417
|
puts ('lines: ' + lines.inspect).debug if @debug
|
|
416
418
|
|
|
417
419
|
puts ('inside scan_to_h').info if @debug
|
|
418
|
-
|
|
420
|
+
txt = lines.join.gsub(/^-*$/,'')
|
|
421
|
+
|
|
422
|
+
if @comment_char then
|
|
423
|
+
txt.gsub!(/(?<=\S) +#{@comment_char}.*|#{@comment_char}[^\n]+/,'')
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
raw_a = LineTree.new(txt.strip,
|
|
419
427
|
ignore_blank_lines: @ignore_blank_lines).to_a
|
|
420
428
|
puts ('raw_a: ' + raw_a.inspect).debug if @debug
|
|
421
429
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
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: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
|
35
35
|
kHNn+ERume1+043nzGdoGxJEUVUPYjRHDzWB1QG7OyRO+e9RZvsTQyTp2+EWVCPD
|
|
36
36
|
haPJ+LVlPvQPLLPI124YDQp8
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date: 2022-09-
|
|
38
|
+
date: 2022-09-27 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: line-tree
|
metadata.gz.sig
CHANGED
|
Binary file
|