polyrex 0.9.13 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 932bd632891aad9d704f28c577f0d74bd87e8086
4
- data.tar.gz: 6ddd40237513fe41bac1d99d3ea2a14536156dd1
3
+ metadata.gz: 5a2953db7261e10bbc6a7102da0cebc30087cbb5
4
+ data.tar.gz: 6a8cab7d36cb59382e3595652dc39aa5ad1c9b09
5
5
  SHA512:
6
- metadata.gz: 9a7e3560650802d78f827fcf4777507c2dc437caae1b9d1aab97c85fef1e63fb0a853d791a4c00bbe3cf1f09c5316396a00ae7e40a58e46cbc62d23509651139
7
- data.tar.gz: 5a7c2cec07f4a06d30c4053b6ae4cffcff9ac5910a0a4c235e459e81ec886d1128f500b5e07888dbae51aa387b870b2e5a7971dd005e76e4736d44ef7ad2056a
6
+ metadata.gz: 82a27a1a6e9c43929d0afb11e1dbe4ee9b1ae527b1e9fcfdd6e36ed1afdfbf55bf874987cf127ae0a9486c80cd748de77300caf7015aff2ea4ff21f1b0a5a26a
7
+ data.tar.gz: cf675f5a88e46e01a795c7e1689c530e5614255c01117f0d8049679265c1a3da050a97aec3d12eca5b4bb41bce968dc5d5c1bb2f4a15ea67e6988d67ff64da5b
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -360,19 +360,35 @@ EOF
360
360
 
361
361
  if @raw_header then
362
362
  header = @raw_header[/<?polyrex (.*)?>/,1]
363
- a = header.scan(/\w+\=["'][^"']+["']/).map do |x|
364
- r = x.split(/=/)
365
- [(r[0] + "=").to_sym, r[1][/^["'](.*)["']$/,1]]
366
- end
363
+ #a = header.scan(/[\w\[\]]+\=["'][^"']+["']/).map do |x|
364
+ # r = x.split(/=/)
365
+ # [(r[0] + "=").to_sym, r[1][/^["'](.*)["']$/,1]]
366
+ #end
367
+ r1 = /([\w\[\]\-]+\s*\=\s*'[^']*)'/
368
+ r2 = /([\w\[\]\-]+\s*\=\s*"[^"]*)"/
369
+
370
+ a = header.scan(/#{r1}|#{r2}/).map(&:compact).flatten
367
371
 
368
372
  if options[:schema] then
369
373
  a.delete a.assoc(:schema)
370
374
  self.method(:schema=).call(options[:schema])
371
375
  end
372
376
 
373
- a.each do |name, value|
374
- unless options.keys.include? name[0..-2].to_sym then
375
- self.method(name).call(value)
377
+ a.each do |x|
378
+
379
+ attr, val = x.split(/\s*=\s*["']/,2)
380
+
381
+ i = attr[/format_masks?\[(\d+)/,1]
382
+
383
+ if i then
384
+
385
+ @format_masks[i.to_i] = val
386
+
387
+ else
388
+ unless options.keys.include? attr[0..-2].to_sym then
389
+ #self.method(name).call(value)
390
+ self.method((attr + '=').to_sym).call(unescape val)
391
+ end
376
392
  end
377
393
  end
378
394
  end
@@ -400,7 +416,11 @@ EOF
400
416
  @parent_node.root.add format_line!( LineTree.new(raw_lines.join("\n").strip).to_a)
401
417
 
402
418
  end
403
-
419
+
420
+ def unescape(s)
421
+ s.gsub('&lt;', '<').gsub('&gt;','>')
422
+ end
423
+
404
424
  def load_handlers(schema)
405
425
 
406
426
  @create = PolyrexCreateObject.new(schema, id: @id_counter)
@@ -438,7 +458,7 @@ EOF
438
458
  # -- end of full text edit methods
439
459
 
440
460
  def horizontal_fieldparse(records, a, i)
441
-
461
+
442
462
  a.each do |x|
443
463
 
444
464
  unless @recordx[i] then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  wbQnaFmJMPFyXo9Yh/95QJEinnBsM0Yk8nJhmcChjdCpQL5243BjgzVEjHI1Ouxe
32
32
  SmUIljyExpxiHQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-12-27 00:00:00.000000000 Z
34
+ date: 2015-01-08 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: polyrex-schema
metadata.gz.sig CHANGED
Binary file