polyrex-schema 0.5.0 → 0.5.1

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: 22acb4e3bff109ff17650ba24a2371672c47a219
4
- data.tar.gz: 8db95862fd0948a6e9d2ec852e3e2ab056951103
3
+ metadata.gz: 368993cccc3c77ad136457f27c735c653bfb526c
4
+ data.tar.gz: bb50eec2268c13501fd8099983e8a2576a9c5490
5
5
  SHA512:
6
- metadata.gz: c077b880f321fa8ffad432847b9b21070902b14be81ac157bbaec3df44ce6caae2bf9c570c80c6c12435baf247d8f2451491a4e8c878591a3c1c28d9dac367cd
7
- data.tar.gz: db56d2b2f13ed395f1e0f524aa3811da6ea32dcf9eebd87d39988e63891a78ecc76aad7801b7359ca87c67d4dfa3ddd329ce59008fc58dcdb48b37f5f5e7314e
6
+ metadata.gz: 3adba93c4174c0e1a793bf4cfb53e3afe04d077d19e5c5495b9faa8502b92570c145d89e83cd713bb102de2d40d8d1011b5431e2ce5e884100b9c274c3253a1b
7
+ data.tar.gz: 51175f0b64bf57ce5c0b5ecb26bb60a49eae8fd60b8e7a38f62da51b38f3123f349d7bcda8463fbf5812b82ce8cb8d13bb01bb431cf493901774150e5e395153
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -31,7 +31,14 @@ class PolyrexSchema
31
31
  a = [s[/^[^\[]+/], *s[/(?<=\[)[^\]]+/].split(/ *, */)].map(&:to_sym)
32
32
  @to_a = [a]
33
33
 
34
- h = {a[0] => {summary: a[1..-1].zip(Array.new(a.length-1)).to_h,
34
+ h2 = {
35
+ format_mask: a[1..-1].map {|x| "[!%s]" % x }.join(' '),
36
+ schema: "%s[%s]" % [a[0], a[1..-1].join(', ')],
37
+ recordx_type: 'polyrex'
38
+ }
39
+
40
+ h = {a[0] => {summary: a[1..-1]\
41
+ .zip(Array.new(a.length-1)).to_h.merge(h2),
35
42
  records: nil }}
36
43
  @to_doc = Rexle.new(RexleBuilder.new(h).to_a)
37
44
  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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file