kvx 1.0.2 → 1.1.1

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/lib/kvx.rb +10 -8
  4. data.tar.gz.sig +0 -0
  5. metadata +30 -31
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59fe7880fcbc6fb271deaa4a861cc59bfbc5c5066ad1ce3bcf8f5118500772da
4
- data.tar.gz: 80add92b8de605c41f52b3d980c1dbef1e0ab36528967ee4afd01f6d489aa29b
3
+ metadata.gz: ea5530d34014e707b2437e10c43ba101ad30f72fbc213e4f130d1b8fd9771b56
4
+ data.tar.gz: 2eb9ef7dbb42e1e664921f05745871cf3486aa55e8abf2b34e91ef803106aff1
5
5
  SHA512:
6
- metadata.gz: c0c42b50055513832cd28efd095fd924359c396af986fc5769b28efb867bf64bcf1175653e1b414b5790184d9feba8500ff4b9a480128d3b38f6ada8e8db1bfa
7
- data.tar.gz: cc230dcef1e3eeb604523676e1d335243706b86d691e210d2cc4fc82a81f14c33cefe1977fb1db1907d7634625b0f008748bdd118d30abfb5720fba0b2441ea0
6
+ metadata.gz: 63bb7be7589852804c5b4ea5e1555c26f366f3bccef0429e7c50adac24d91a90e18c6c91ba03442450e989dd317cc9c656b4ec3768cd931fe2c90e4f05168ead
7
+ data.tar.gz: 96947516061e9d56379452bd1cdb5117c1c7af11ca182f03aa37da732844bfc834df82d415aca15bbce34a985f2935e996c501d2cbe993d333b2a14c11572364
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 'rxfhelper'
6
+ require 'rxfreadwrite'
7
7
  require 'rexle-builder'
8
8
 
9
9
  module RegGem
@@ -28,17 +28,17 @@ end
28
28
  # * s -> h
29
29
 
30
30
  class Kvx
31
- include RXFHelperModule
31
+ include RXFReadWriteModule
32
32
  using ColouredText
33
33
 
34
34
  attr_accessor :attributes, :summary
35
35
  attr_reader :to_h
36
36
 
37
- def initialize(x=nil, attributes: {}, debug: false)
37
+ def initialize(x=nil, summary: {}, body: {}, attributes: {}, debug: false)
38
38
 
39
39
  @header = attributes.any?
40
40
  @identifier = 'kvx'
41
- @summary = {}
41
+ @summary, @body = summary, body
42
42
  @ignore_blank_lines ||= false
43
43
 
44
44
  @attributes, @debug = attributes, debug
@@ -56,9 +56,11 @@ class Kvx
56
56
  sym = h[x.class.to_s.downcase.to_sym]
57
57
  puts 'sym: ' + sym.inspect if @debug
58
58
  @body = method(sym).call x
59
- methodize(@body)
59
+
60
60
  end
61
61
 
62
+ methodize(@body)
63
+
62
64
  end
63
65
 
64
66
  def import(s)
@@ -308,10 +310,10 @@ s = "
308
310
 
309
311
  def parse_string(s)
310
312
 
311
- buffer, type = RXFHelper.read(s)
313
+ buffer, type = RXFReader.read(s)
312
314
  puts ('buffer: ' + buffer.inspect).debug if @debug
313
315
 
314
- if buffer.force_encoding("UTF-8").lstrip =~ /^<\?xml/ then
316
+ if buffer.lstrip =~ /^<\?xml/ then
315
317
 
316
318
  s = buffer.force_encoding("UTF-8")
317
319
  doc = Rexle.new(s)
@@ -342,7 +344,7 @@ s = "
342
344
 
343
345
  def parse_to_h(s, header_pattern: %r(^<\?kvx[\s\?]))
344
346
 
345
- raw_txt, _ = RXFHelper.read(s).force_encoding("UTF-8")
347
+ raw_txt, _ = RXFReader.read(s)
346
348
 
347
349
  # does the raw_txt contain header information?
348
350
  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.0.2
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -11,31 +11,31 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CER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EEkDFWZn6zxxw
31
- wETcFLVEdzWeyJyTnjrfVYCJMlHr+mR9gXx2Fgz8vjqCu2O39NXuJqO9BrmoxkoD
32
- jGcTdRnq6g6KcNOHlJCw6jvZUHSTeTtBPUEGkSNS5L3GejW65iwHWLY/WNtI4kzQ
33
- 9uR/zCKdJ0zJ/N7OEpBBMg05VTSR2nBwlTmacHdL/keDUuIUDd2APddKSr5F+voZ
34
- ci+ozAEgQCeqDFapyRPqMGm8fO7Sa4i4BxGnDf6G3K9P6Rg9yEzpSbGTED9U+nlX
35
- m/+jxdgFjKKGxeZqunu9cp5ca9wSjjtKh/VA/3xZtPwokCa7vCMB+ZxUP0jvd++u
36
- OTXy8k/zqddw/VfD/It1UUK4
28
+ BgkqhkiG9w0BAQsFAAOCAYEAicVrydLWjfj1nI+UBsAelInmLwR+Jm6GmhlwIwVP
29
+ KxXojEY5ezMG9AKRcBSVB4+QRVzQS39ytywDF11CwM0ldzfLZ6uAEdv4LZG1GByN
30
+ RotgJaIzV8aMsQpn4ICCgDfOhrhAHM3LPTFEYvwjqHO4PvdWRt1YEpz006YD+Woj
31
+ P4OUQrI31O44jk5mdGX+fsMV6A/rLb4kAkieTlYqFjRtAG8k8tS/SsyKoi9CnFvR
32
+ qUvUuGh+BTRSo3CTdkGY4BnDD92fGb7Hb1/RZ+pxhlr0n9a/QwmB11m/M9765h0s
33
+ 2Z49RQpI282bp42VWEtldFWrCv9xunHOElHjUfTTmgcX5ib6llUmvHxQKMrKp5R2
34
+ jVFpUSnOFahigvADhfV06dXy+YMaFFUgn0TOCtT6ifCT4ZzrlhlXYqELlrNobwyr
35
+ kHNn+ERume1+043nzGdoGxJEUVUPYjRHDzWB1QG7OyRO+e9RZvsTQyTp2+EWVCPD
36
+ haPJ+LVlPvQPLLPI124YDQp8
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-18 00:00:00.000000000 Z
38
+ date: 2022-05-24 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: rxfhelper
61
+ name: rxfreadwrite
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '1.3'
66
+ version: '0.2'
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 1.3.3
69
+ version: 0.2.6
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: '1.3'
76
+ version: '0.2'
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 1.3.3
79
+ version: 0.2.6
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
- rubyforge_project:
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
Binary file