polyrex-schema 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -7
- data.tar.gz.sig +0 -0
- data/lib/polyrex-schema.rb +21 -1
- metadata +12 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98bb3cbb54255cdc9332cccd236b81b35aa947d4
|
|
4
|
+
data.tar.gz: 8cbd82a5f729e04f88a7d44f5416551520b2e0e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29dc42a6f336942cfe830657e71611c4ae4d6bb02dc3868489353660fb304817fd0eaf8a91574139b9793796e8921c899cad2b3ca72ba04079af6ba50c2a0f78
|
|
7
|
+
data.tar.gz: a6cb3fb25065d772f52df814fcd67da042d7ea265de6a12ef165f59152e371fda43948bafc1d880841959586f5b931979227a23acc74fbdcb6ed5ddcbe419296
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
��d9o��c��P��'�b>N
|
|
4
|
-
��
|
|
5
|
-
��^�n��0S����7$�p�/�)�TB��l-� /�o���E�Gz
|
|
6
|
-
|
|
7
|
-
QN��f���"����2!�K�h�/�N�A�9�~!�l��/�������U�
|
|
1
|
+
E�m�LӨq�J'pb�a�6��D7:��t�.O�t�E
|
|
2
|
+
a���p�a俁���
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/polyrex-schema.rb
CHANGED
|
@@ -15,6 +15,10 @@ class PolyrexSchema
|
|
|
15
15
|
@doc = Rexle.new(r)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
def to_a()
|
|
19
|
+
scan_to_a(@doc.root.element 'records/.')
|
|
20
|
+
end
|
|
21
|
+
|
|
18
22
|
def to_doc()
|
|
19
23
|
@doc
|
|
20
24
|
end
|
|
@@ -37,8 +41,10 @@ class PolyrexSchema
|
|
|
37
41
|
|
|
38
42
|
raw_siblings = line[/\{.*/]
|
|
39
43
|
|
|
44
|
+
|
|
40
45
|
if raw_siblings then
|
|
41
|
-
|
|
46
|
+
|
|
47
|
+
return raw_siblings[1..-2].split(/\s*\s*;/).map{|x| add_node [x] + a}
|
|
42
48
|
end
|
|
43
49
|
|
|
44
50
|
name, raw_fields = line.split('[',2)
|
|
@@ -59,4 +65,18 @@ class PolyrexSchema
|
|
|
59
65
|
)
|
|
60
66
|
end
|
|
61
67
|
|
|
68
|
+
def scan_to_a(r)
|
|
69
|
+
|
|
70
|
+
a = r.xpath('summary/*/name()') # => ["entry", "format_mask"]
|
|
71
|
+
fields = (a - ["format_mask"]).map(&:to_sym)
|
|
72
|
+
node = r.element 'records/.'
|
|
73
|
+
|
|
74
|
+
if node then
|
|
75
|
+
children = scan_to_a(node)
|
|
76
|
+
[r.name.to_sym, *fields, children]
|
|
77
|
+
else
|
|
78
|
+
[r.name.to_sym, *fields]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
62
82
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polyrex-schema
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,22 +31,28 @@ cert_chain:
|
|
|
31
31
|
x3ppGgUf/zri8F8syPC4U/PhiV9ZBYGjFZDoQWr9TW6gJ1rEPuB1RYH9RPLaSYy4
|
|
32
32
|
SFJGImVxuM2M+Q==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2014-
|
|
34
|
+
date: 2014-06-10 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rexle
|
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
|
+
- - "~>"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '1.0'
|
|
40
43
|
- - ">="
|
|
41
44
|
- !ruby/object:Gem::Version
|
|
42
|
-
version:
|
|
45
|
+
version: 1.0.11
|
|
43
46
|
type: :runtime
|
|
44
47
|
prerelease: false
|
|
45
48
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
49
|
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '1.0'
|
|
47
53
|
- - ">="
|
|
48
54
|
- !ruby/object:Gem::Version
|
|
49
|
-
version:
|
|
55
|
+
version: 1.0.11
|
|
50
56
|
description:
|
|
51
57
|
email: james@r0bertson.co.uk
|
|
52
58
|
executables: []
|
|
@@ -66,7 +72,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
66
72
|
requirements:
|
|
67
73
|
- - ">="
|
|
68
74
|
- !ruby/object:Gem::Version
|
|
69
|
-
version:
|
|
75
|
+
version: 2.1.2
|
|
70
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
77
|
requirements:
|
|
72
78
|
- - ">="
|
|
@@ -74,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
74
80
|
version: '0'
|
|
75
81
|
requirements: []
|
|
76
82
|
rubyforge_project:
|
|
77
|
-
rubygems_version: 2.
|
|
83
|
+
rubygems_version: 2.2.2
|
|
78
84
|
signing_key:
|
|
79
85
|
specification_version: 4
|
|
80
86
|
summary: The polyrex-schema gem creates Polyrex XML from an initial shorthand schematic
|
metadata.gz.sig
CHANGED
|
Binary file
|