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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41d6b677f06024f5b63bfece90cc404016c8ee0b
4
- data.tar.gz: ab7587fed11359d0db0eeb4c111fe79845b155fa
3
+ metadata.gz: 29b9fb069d346a9ed3ea8e80c78f89c9a6693b16
4
+ data.tar.gz: 174201bd0242d9eacf25fb4f6285bfcfc87ced34
5
5
  SHA512:
6
- metadata.gz: 03a01ce1bffc687d33ccdebb207b2324aa9027c4ca106ac368ea064853fbb8b64166cae4bc2285d74e930e697002791ee1ca552c4fdbd05816321976c947b3c3
7
- data.tar.gz: 9ec6232ee12ec15f1a6904f88d98dfe53076b545ac47436293422d7eb1e8afd8f7153856d8e62c8de23495185a23c52db5815602142b9e94432ecd4857fd3230
6
+ metadata.gz: c1df8edd790749daa04abb404921ee12f8033cdafaa805ef66026ea6df496fa406929eb3d222011ea84332b35e417418b1c7aef23d100c0f411d6757ff6efce2
7
+ data.tar.gz: 7605377416173826f08e495d0263f378003af0acc01ed7e948143d442744799707c68b3b59a26b1e85c1c8c6463dbf517a4b8454073603d09461aea30727bc22
checksums.yaml.gz.sig CHANGED
Binary file
@@ -9,7 +9,8 @@ class PolyrexSchema
9
9
  def initialize(s)
10
10
 
11
11
  s.prepend 'root/' if s[0] == '{'
12
- a = s.split('/')
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
- return raw_siblings[1..-2].split(/\s*\s*;/).map{|x| add_node [x] + a}
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 - ["format_mask"]).map(&:to_sym)
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
- ̺[��'��'_�R�R'��⺼�0��'걀�����, �&D�N'���㡙G( ku�����/D�>A?�Ɋ'Jo#�%JO\��_
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.1
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-06 00:00:00.000000000 Z
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