xml-registry 0.3.1 → 0.4.2
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 +26 -2
- data.tar.gz.sig +3 -2
- metadata +8 -8
- metadata.gz.sig +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e801a172eedccefac1aa7769c889e58d7a498110
|
4
|
+
data.tar.gz: 0f0b8c936dab5643f24cb79c61e3f611f9fa5a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9698ba61797de05701997566f4c759041d246ab49fbca7cbcf1ba177f3e4f159b51c44cecf5e3e98fbd2dd9665267a97236de8aac219fd1e9f3d477013caf57
|
7
|
+
data.tar.gz: 1661769a5f0e5f5e797d2ab7db1372ddedd3fc67a1d55102ea0a6a352b4137858875e3a445ee4bbc9617588f3f8e49422da291828470e9b53b00edfb684a32b3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/xml-registry.rb
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
|
3
3
|
# file: xml-registry.rb
|
4
4
|
|
5
|
-
require 'rexle'
|
5
|
+
#require 'rexle'
|
6
6
|
require 'rxfhelper'
|
7
|
+
require 'simple-config'
|
7
8
|
|
8
9
|
|
9
10
|
class XMLRegistry
|
@@ -54,13 +55,36 @@ class XMLRegistry
|
|
54
55
|
# returns the value as a Rexle::Element
|
55
56
|
#
|
56
57
|
def get_key(path)
|
58
|
+
|
57
59
|
key = @doc.root.element path
|
58
60
|
raise ("xml-registry: key %s not found" % path) unless key
|
61
|
+
|
62
|
+
key.instance_eval {
|
63
|
+
@path = path
|
64
|
+
|
65
|
+
def hashify(e)
|
66
|
+
|
67
|
+
v = if e.has_elements? then
|
68
|
+
e.elements.inject({}) do |r, x|
|
69
|
+
r.merge hashify(x)
|
70
|
+
end
|
71
|
+
else
|
72
|
+
e.text
|
73
|
+
end
|
74
|
+
|
75
|
+
{e.name => v}
|
76
|
+
end
|
77
|
+
|
78
|
+
def to_config()
|
79
|
+
SimpleConfig.new(hashify(self), attributes: {key: @path})
|
80
|
+
end
|
81
|
+
}
|
82
|
+
|
59
83
|
key
|
60
84
|
end
|
61
85
|
|
62
86
|
# get several keys using a Rexle XPath
|
63
|
-
# example:
|
87
|
+
# example: get_keys('//funday') #=> [<funday>tuesday</funday>,<funday>friday</funday>]
|
64
88
|
#
|
65
89
|
# returns an array of 0 or more Rexle elements
|
66
90
|
#
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�ғ]�?na�\��ٳr���5V�Ħ�Їy�@;�^�e$-���_��/��f�3G�c[���)�6�m��X�
|
2
|
+
�����u��ܧ�JM��lT!zY�5��XyUN&� ���`p������oN��F�Z:ox��֤;�T
|
3
|
+
����zk�g�u+��^�'(Y�n�!�
|
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.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,28 +31,28 @@ cert_chain:
|
|
31
31
|
OJamM7Bcj9+piGsKBJNnDsRMUDp9HTnzSQZQa6VGuC+B8wmTfyHedNg8nhA5omWj
|
32
32
|
01hmb/53blp2Mw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
37
|
+
name: simple-config
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '0.4'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 0.4.2
|
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: '
|
52
|
+
version: '0.4'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 0.4.2
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rxfhelper
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.4.6
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: xml-registry
|
metadata.gz.sig
CHANGED
@@ -1 +1,3 @@
|
|
1
|
-
|
1
|
+
�Qj��iOP.�u���2[�[QLzն+���{�od�qT��b[L-U؋�:v�����*FB�+a��Q�1��Y��"icu��?��i������*���� wM����>�%�
|
2
|
+
-td
|
3
|
+
�_#c�A\�\�D��|��VT�tY�����4���e��^���6��^��W�f�S�5����6�>�J���?�O���mV��3�3Ȱ�ZG�-�zz�j��Lǚ8���~�߽�� (V�hvi��
|