xml-registry 0.4.4 → 0.5.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/xml-registry.rb +16 -5
- data.tar.gz.sig +0 -0
- metadata +22 -22
- metadata.gz.sig +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e49bef3fd75dd4915a13fafb8323f237e09843f
|
4
|
+
data.tar.gz: 2219b82b077216d24989793bc941cb5669741b64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef309b0c7e11bf75ccc9ad180a592b2b7b1ca9b392244ee11f10abdf2bc0d94bae06e167f6c44956d562038d2c583f1bb1405f0d90a4ef9aac590a893011b418
|
7
|
+
data.tar.gz: a7d79c4d122a5b83361ac0a5138e5374414a0de243f7f66be3196a89abd4bd2447887886dcbd485a36117a23f3aa4b2d8a1650683a7bf136632635a5d44b7178
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/xml-registry.rb
CHANGED
@@ -34,14 +34,17 @@ class XMLRegistry
|
|
34
34
|
|
35
35
|
# if the 1st element doesn't exist create it
|
36
36
|
e = path.split('/',2).first
|
37
|
+
|
37
38
|
@doc.root.add_element Rexle::Element.new(e) unless @doc.root.element e
|
38
39
|
create_path = find_path(path)
|
39
|
-
|
40
|
+
|
40
41
|
if not create_path.empty? then
|
41
|
-
|
42
|
+
|
43
|
+
a = path.split('/').map {|x| x.to_i.to_s == x ? x.prepend('x') : x}
|
44
|
+
parent_path = (a - create_path.reverse).join('/')
|
42
45
|
key_builder(parent_path, create_path)
|
43
46
|
end
|
44
|
-
|
47
|
+
|
45
48
|
add_value(path, value)
|
46
49
|
end
|
47
50
|
|
@@ -199,20 +202,28 @@ class XMLRegistry
|
|
199
202
|
private
|
200
203
|
|
201
204
|
def add_key(path='app', key='untitled')
|
205
|
+
|
202
206
|
node = @doc.root.element path
|
203
207
|
r = node.add_element Rexle::Element.new(key)
|
204
208
|
r
|
209
|
+
|
205
210
|
end
|
206
211
|
|
207
212
|
def add_value(key, value)
|
208
|
-
|
213
|
+
s = key.split('/').map {|x| x.to_i.to_s == x ? x.prepend('x') : x}.join '/'
|
214
|
+
@doc.root.element(s).text = value
|
209
215
|
end
|
210
216
|
|
211
217
|
def find_path(path, create_path=[])
|
212
218
|
|
213
219
|
return create_path if !@doc.root.xpath(path).empty?
|
214
220
|
apath = path.split('/')
|
215
|
-
|
221
|
+
|
222
|
+
x = apath.pop
|
223
|
+
|
224
|
+
x.prepend 'x' if x.to_i.to_s == x
|
225
|
+
create_path << x
|
226
|
+
|
216
227
|
find_path(apath.join('/'), create_path)
|
217
228
|
end
|
218
229
|
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE2MDYxMzE4MjgzNFoXDTE3MDYxMzE4MjgzNFowSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQAD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j
|
31
|
+
8NnTRE6giDgOSmiS3cUBa4NDAOa0G4FP3jSUGMylDswvYepLYk5XYONr9/0NQ66a
|
32
|
+
dQHXSvg1fTpm2Q==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: simple-config
|
@@ -39,20 +39,20 @@ dependencies:
|
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.6'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.6.1
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.6'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.6.1
|
56
56
|
description:
|
57
57
|
email: james@r0bertson.co.uk
|
58
58
|
executables: []
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: xml-registry
|
metadata.gz.sig
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
�
|
5
|
-
��L@��zg��}���y-��X B���H�ǬH��i�
|
1
|
+
I�_�V33�h��N=t����H\��.�Z��b��-���b
|
2
|
+
ҮN��CSlwհ_�l�ʭw�g��2�4W��{��h�{K�F�
|
3
|
+
��H��g?͆_���D��.�]�ts~fNگ�⏢X��@���b�e,Clc�aG�����m`/�l���e��=��q�B�3�Bm����n����!�4�Q �<���
|
4
|
+
B�>���a���KHY�c3}&*��t��`��OwI�^��\q����9RŬ�@��T�����?n)
|