xml-registry 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 667bdd8cb557aaca4ea00df166d7bf0f8542a0c6d2faedeabc14c26dba83d6a0
4
- data.tar.gz: 8a1ecbca36cee8fe8bf5e31612265f4dc384642d4c53a4d042bf324114b1a8a7
3
+ metadata.gz: 280ac5c817560aa72e83c93eabf4358d1a169781717442b7b4e2c7ee95ca1ec0
4
+ data.tar.gz: 0a8a32baea55901636b3a28ef6b585393883f4717107b17af84a46365a0c8658
5
5
  SHA512:
6
- metadata.gz: d3f73f6a72768069389584be2e733f2ad85494088bd4ad95ff98f6f86fd183e0f38152777971e1633fc3e59ec4e8e3fcbae9a76161039b8c48ff9be1d3c3f2c1
7
- data.tar.gz: fb077f993036fe580363abeb6e00300e6fee9989ec18b928f95c2e5d390c39e5df1e6fc100fcbb527d8045fba896f7dd1b9130fe29d982ee1e419a06275dc6f0
6
+ metadata.gz: af319f07195089806be005eb10b42267e359a65c6f668ccda8ba618b3b36019c433abede751bf10e5d7dadfdb1c3719309538db765bb56c1e7933fc528f42a56
7
+ data.tar.gz: a5bddd352a8865dc253cda635dde28a6ba8b66c1ad094c9b2cf5368bb1e74b32164cc8c7e2e9240be7e4e9f25d047a5ffcf1d1ed395ba748dbdf2498a376aca2
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/xml-registry.rb CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  # file: xml-registry.rb
4
4
 
5
- #require 'rexle'
6
- #require 'rxfhelper'
5
+ require 'rexle'
6
+ require 'kvx'
7
+ require 'ostruct'
7
8
  require 'simple-config'
9
+ require 'rxfreadwrite'
8
10
 
9
11
 
10
12
  module NumberCheck
@@ -20,6 +22,7 @@ end
20
22
 
21
23
  class XMLRegistry
22
24
  using NumberCheck
25
+ include RXFReadWriteModule
23
26
 
24
27
  attr_reader :doc
25
28
 
@@ -27,7 +30,7 @@ class XMLRegistry
27
30
 
28
31
  @debug = debug
29
32
  super()
30
- @template, _ = RXFHelper.read(template)
33
+ @template, _ = RXFReader.read(template)
31
34
  @doc = Rexle.new(@template)
32
35
  end
33
36
 
@@ -144,14 +147,14 @@ class XMLRegistry
144
147
  # load a new registry xml document replacing the existing registry
145
148
  #
146
149
  def load_xml(s='')
147
- @doc = Rexle.new(RXFHelper.read(s)[0].force_encoding("UTF-8"))
150
+ @doc = Rexle.new(RXFReader.read(s)[0].force_encoding("UTF-8"))
148
151
  self
149
152
  end
150
153
 
151
154
  # save the registry to the specified file path
152
155
  #
153
156
  def save(s)
154
- RXFHelper.write s, @doc.xml(pretty: true)
157
+ FileX.write s, @doc.xml(pretty: true)
155
158
  end
156
159
 
157
160
  # import a registry hive from a string in registry format
@@ -173,7 +176,7 @@ class XMLRegistry
173
176
  #
174
177
  def import(s)
175
178
 
176
- r = RXFHelper.read(s)
179
+ r = RXFReader.read(s)
177
180
  reg_buffer = r.first
178
181
  raise "read file error" unless reg_buffer
179
182
 
@@ -231,7 +234,7 @@ class XMLRegistry
231
234
  def export(s=nil)
232
235
  reg = print_scan(@doc.root).join("\n")
233
236
  # jr 250118 File.open(s){|f| f.write reg} if s
234
- RXFHelper.write(s, reg) if s
237
+ FileX.write(s, reg) if s
235
238
  reg
236
239
  end
237
240
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-registry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  qQ7EyBaXak1o/nkw5pybDKSbUjVOvQpzjla62Xe4FzHerw4+UYRKyq6OjeDckoJD
36
36
  qwMwsoB0WJMRTqSZ4g1aEmfr
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-16 00:00:00.000000000 Z
38
+ date: 2022-02-22 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: simple-config
metadata.gz.sig CHANGED
Binary file