xml-registry 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data/lib/xml-registry.rb +24 -2
- data.tar.gz.sig +0 -0
- metadata +31 -26
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1be5e09b2429e5cca7b0cec165269845ad9bda4fbf7384705f2b884d814381bd
|
4
|
+
data.tar.gz: 04d20465fd4a50bb43a214767904014401ae7437d389a00fde627cbfa9ccd5dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2c0ed23c3128cbff4c697a6944813b7d5d65816929a8e05ba3874152445ebfc4def88394efbaa5dde494a3f1bdb225f5d3297247eb2c354b14e6bd835e04c42
|
7
|
+
data.tar.gz: 26e18295443a69b2632138c749723173d7d8f0326190951217f33e3d20416e0b47840eb4f1c35e7f17a630e87b0e72c037bb1efd52359e4a06b197b879ff7345
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/xml-registry.rb
CHANGED
@@ -23,7 +23,9 @@ class XMLRegistry
|
|
23
23
|
|
24
24
|
attr_reader :doc
|
25
25
|
|
26
|
-
def initialize(template = '<root></root>')
|
26
|
+
def initialize(template = '<root></root>', debug: false)
|
27
|
+
|
28
|
+
@debug = debug
|
27
29
|
super()
|
28
30
|
@template, _ = RXFHelper.read(template)
|
29
31
|
@doc = Rexle.new(@template)
|
@@ -181,6 +183,25 @@ class XMLRegistry
|
|
181
183
|
[x[/^\[(.[^\]]+)\]/,1], Hash[*($').scan(/"([^"]+)"="(.[^"]*)"/).flatten]]
|
182
184
|
end
|
183
185
|
|
186
|
+
elsif reg_buffer.strip.lines.grep(/^\s+\w/).any?
|
187
|
+
|
188
|
+
puts 'hierachical import' if @debug
|
189
|
+
doc = LineTree.new(reg_buffer).to_doc
|
190
|
+
|
191
|
+
reg_items = []
|
192
|
+
|
193
|
+
doc.root.each_recursive do |e|
|
194
|
+
|
195
|
+
puts 'e: ' + e.inspect if @debug
|
196
|
+
if e.is_a?(Rexle::Element) and e.children.length < 2 then
|
197
|
+
|
198
|
+
reg_items << [e.backtrack.to_xpath.sub(/^root\//,'')\
|
199
|
+
.sub(/\/[^\/]+$/,''), {e.name => e.text }]
|
200
|
+
|
201
|
+
end
|
202
|
+
|
203
|
+
end
|
204
|
+
|
184
205
|
else
|
185
206
|
|
186
207
|
reg_items = reg_buffer.split(/(?=^[^:]+$)/).map do |raw_section|
|
@@ -195,6 +216,7 @@ class XMLRegistry
|
|
195
216
|
|
196
217
|
end
|
197
218
|
|
219
|
+
puts 'reg_items: ' + reg_items.inspect if @debug
|
198
220
|
reg_items.each do |path, items|
|
199
221
|
items.each {|k,value| self.set_key("%s/%s" % [path,k], value)}
|
200
222
|
end
|
@@ -262,4 +284,4 @@ class XMLRegistry
|
|
262
284
|
out
|
263
285
|
end
|
264
286
|
|
265
|
-
end
|
287
|
+
end
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEX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JvYmVydHNvbi5ldTAN
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAoF9tmO4VAAEyCkBYnNEOMiOiurr82x4Enlq83Ng1
|
29
|
+
6Svb49xxq0royYmlsVUzcDun31UTVZIG60mRhZlw/eQ3gPeq/2vNiQDLbDOchJ0A
|
30
|
+
p28M0LkVNwD4mhmW4Dqon/VX7RyL2HOa1bogK7k038wktuCm1i0l4a71//oZuUfh
|
31
|
+
eB8r9R7SX7prHyFnBSgDtfEHedWjg+eFJpmWlly3oHM8vNXoHfhomSAaoHy7ivRS
|
32
|
+
bF4593JPPQdcsxZzciAElMmjMAM7OEyJiRkCFwC/KkSJ8OAHXYVuIrczPcefGvs4
|
33
|
+
fnNfCqQzWQLJf2K0fTSFZRj33W3jAiEfgGfP4Q2APkfclUm5oO9sFwWbrkhDwZxl
|
34
|
+
Lev5l1ly85ZtYlLIotu/PL3cPeohnZPY7rI+HGoHC21O6a99qVQXFP+kkErs81mo
|
35
|
+
MYGFLBUz5wXgJgx3utFrNJwLp7Y4wEAzL5KoeySaQub6rFUeCGfpi/Verm9WPRqH
|
36
|
+
oY185KtHIZDihehN4jjAxIqU
|
33
37
|
-----END CERTIFICATE-----
|
34
|
-
date: 2018-
|
38
|
+
date: 2018-10-03 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: simple-config
|
@@ -42,7 +46,7 @@ dependencies:
|
|
42
46
|
version: '0.6'
|
43
47
|
- - ">="
|
44
48
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.6.
|
49
|
+
version: 0.6.4
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -52,7 +56,7 @@ dependencies:
|
|
52
56
|
version: '0.6'
|
53
57
|
- - ">="
|
54
58
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.6.
|
59
|
+
version: 0.6.4
|
56
60
|
description:
|
57
61
|
email: james@jamesrobertson.eu
|
58
62
|
executables: []
|
@@ -80,8 +84,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
84
|
version: '0'
|
81
85
|
requirements: []
|
82
86
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.6
|
87
|
+
rubygems_version: 2.7.6
|
84
88
|
signing_key:
|
85
89
|
specification_version: 4
|
86
|
-
summary:
|
90
|
+
summary: The XML registry can be used to store or retrieve app settings etc. in an
|
91
|
+
XML document.
|
87
92
|
test_files: []
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
��0�V��e�f*{G[)E^�Db�&aI����X�v�U�+�8l��`��P�K�}��Z�BӰ4s:��y���@��]JN^�7�~)�
|
2
|
+
�N�w�o�`�k����3����+{
|