polyrex-schema 0.2.1 → 0.2.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/polyrex-schema.rb +10 -6
- data.tar.gz.sig +1 -2
- metadata +2 -2
- 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: 29b9fb069d346a9ed3ea8e80c78f89c9a6693b16
|
4
|
+
data.tar.gz: 174201bd0242d9eacf25fb4f6285bfcfc87ced34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1df8edd790749daa04abb404921ee12f8033cdafaa805ef66026ea6df496fa406929eb3d222011ea84332b35e417418b1c7aef23d100c0f411d6757ff6efce2
|
7
|
+
data.tar.gz: 7605377416173826f08e495d0263f378003af0acc01ed7e948143d442744799707c68b3b59a26b1e85c1c8c6463dbf517a4b8454073603d09461aea30727bc22
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-schema.rb
CHANGED
@@ -9,7 +9,8 @@ class PolyrexSchema
|
|
9
9
|
def initialize(s)
|
10
10
|
|
11
11
|
s.prepend 'root/' if s[0] == '{'
|
12
|
-
|
12
|
+
|
13
|
+
a = s.scan(/(\{[^\}]+\})|(\w+[^\/]*)\/|\/(.*)/).flatten(1).compact
|
13
14
|
|
14
15
|
r = add_node a
|
15
16
|
r[3] << node('recordx_type', 'polyrex') << node('schema',s)
|
@@ -43,15 +44,18 @@ class PolyrexSchema
|
|
43
44
|
return if a.empty?
|
44
45
|
|
45
46
|
schema = a.join('/')
|
46
|
-
|
47
47
|
line = a.shift
|
48
|
-
|
49
48
|
raw_siblings = line[/\{.*/]
|
50
49
|
|
51
|
-
|
52
50
|
if raw_siblings then
|
53
51
|
|
54
|
-
|
52
|
+
r = raw_siblings[1..-2].split(/\s*\s*;/).map do |x|
|
53
|
+
|
54
|
+
a2 = x.scan(/(\{[^\}]+\})|(\w+[^\/]*)\/|\/(.*)|(.+)/).flatten(1).compact
|
55
|
+
add_node a2 + a
|
56
|
+
end
|
57
|
+
|
58
|
+
return r
|
55
59
|
end
|
56
60
|
|
57
61
|
name, raw_fields = line.split('[',2)
|
@@ -78,7 +82,7 @@ class PolyrexSchema
|
|
78
82
|
nodes.map do |r|
|
79
83
|
|
80
84
|
a = r.xpath('summary/*/name()') # => ["entry", "format_mask"]
|
81
|
-
fields = (a -
|
85
|
+
fields = (a - %w(schema format_mask)).map(&:to_sym)
|
82
86
|
node = r.xpath 'records/.'
|
83
87
|
|
84
88
|
if node.any? then
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
2
|
-
l�dw��I�1h�����:��B;k:�a��m� V\�%�e�7��8i���K�V���g��CV������,57y
|
1
|
+
|
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.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
x3ppGgUf/zri8F8syPC4U/PhiV9ZBYGjFZDoQWr9TW6gJ1rEPuB1RYH9RPLaSYy4
|
32
32
|
SFJGImVxuM2M+Q==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-08-
|
34
|
+
date: 2014-08-09 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|