kvx 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/kvx.rb +15 -5
- data.tar.gz.sig +0 -0
- metadata +8 -9
- metadata.gz.sig +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0985854184a09b20770031ef31762156103e708c9a52d35f39442f35e454a3a
|
4
|
+
data.tar.gz: 9f6ddacfe15e0189d8ee4875a70c4d1a0fc79c31dbbde264c528f7b3a6bc69ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5675ccfb52ff495bf136f4bea6def10fa8481b669f4d653dec571fe9b6c13dad812485f225f7f49d195321d0fc380b04414e5f738027c0d6f8efffd1ffbf0670
|
7
|
+
data.tar.gz: 7d2eb7037efcd05b8a94d552173d20c26ff6f0a2183e0e7b40e32546b05ddb0bd226f9d85d669aa05b5fc2183bed25488ca6ce207e9aa15cef83ebf082f56b15
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/kvx.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# file: kvx.rb
|
4
4
|
|
5
5
|
require 'line-tree'
|
6
|
-
require '
|
6
|
+
require 'rxfreadwrite'
|
7
7
|
require 'rexle-builder'
|
8
8
|
|
9
9
|
module RegGem
|
@@ -28,7 +28,7 @@ end
|
|
28
28
|
# * s -> h
|
29
29
|
|
30
30
|
class Kvx
|
31
|
-
include
|
31
|
+
include RXFReadWriteModule
|
32
32
|
using ColouredText
|
33
33
|
|
34
34
|
attr_accessor :attributes, :summary
|
@@ -308,14 +308,18 @@ s = "
|
|
308
308
|
|
309
309
|
def parse_string(s)
|
310
310
|
|
311
|
-
buffer, type =
|
311
|
+
buffer, type = RXFReader.read(s)
|
312
312
|
puts ('buffer: ' + buffer.inspect).debug if @debug
|
313
313
|
|
314
314
|
if buffer.lstrip =~ /^<\?xml/ then
|
315
|
-
|
315
|
+
|
316
|
+
s = buffer.force_encoding("UTF-8")
|
317
|
+
doc = Rexle.new(s)
|
316
318
|
@instructions = doc.instructions
|
317
319
|
puts '@instructions: ' + @instructions.inspect if @debug
|
320
|
+
|
318
321
|
xml_to_h(doc.root)
|
322
|
+
|
319
323
|
else
|
320
324
|
parse_to_h(buffer)
|
321
325
|
end
|
@@ -325,14 +329,20 @@ s = "
|
|
325
329
|
def methodize(h)
|
326
330
|
|
327
331
|
h.each do |k,v|
|
332
|
+
|
328
333
|
define_singleton_method(k){v} unless self.methods.include? k
|
334
|
+
|
335
|
+
unless self.methods.include? (k.to_s + '=').to_sym then
|
336
|
+
define_singleton_method((k.to_s + '=').to_sym){|x| h[k] = x}
|
337
|
+
end
|
338
|
+
|
329
339
|
end
|
330
340
|
|
331
341
|
end
|
332
342
|
|
333
343
|
def parse_to_h(s, header_pattern: %r(^<\?kvx[\s\?]))
|
334
344
|
|
335
|
-
raw_txt, _ =
|
345
|
+
raw_txt, _ = RXFReader.read(s)
|
336
346
|
|
337
347
|
# does the raw_txt contain header information?
|
338
348
|
a = s.strip.lines
|
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.
|
4
|
+
version: 1.1.0
|
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:
|
38
|
+
date: 2022-02-20 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: line-tree
|
@@ -58,25 +58,25 @@ dependencies:
|
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.9.3
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
61
|
+
name: rxfreadwrite
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '0.1'
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.1
|
69
|
+
version: 0.1.1
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '0.1'
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 1.1
|
79
|
+
version: 0.1.1
|
80
80
|
description:
|
81
81
|
email: digital.robertson@gmail.com
|
82
82
|
executables: []
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.7.10
|
106
|
+
rubygems_version: 3.2.22
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: Kvx (Keys, Values, and XML) makes it convenient to store and retrieve the
|
metadata.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
�)'�a[1�oa����P�}\��T�)���ڰȀW5z���)�H���f��Sr�2.��TT܀u�K���T��������z�1��M���r��9D��OC���6@�?�^8�J�
|
2
|
+
YNJ�.�fjjy��M���b�y����T<c�^�;��
|
3
|
+
�u��Om�e���ِ���9vQDqWל�J�:y�6.Z<�,X�u�c����_��y4$]C[OjӒe�svulX�/.p�ua`���T�t�^o�/�s��nťcLYV��g�#�+��Q��q/��Ii��E�0�㦍%;P5�?Uu��G� 7��(�+��2<Z
|