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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/polyrex.rb +29 -9
- 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: 5a2953db7261e10bbc6a7102da0cebc30087cbb5
|
4
|
+
data.tar.gz: 6a8cab7d36cb59382e3595652dc39aa5ad1c9b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82a27a1a6e9c43929d0afb11e1dbe4ee9b1ae527b1e9fcfdd6e36ed1afdfbf55bf874987cf127ae0a9486c80cd748de77300caf7015aff2ea4ff21f1b0a5a26a
|
7
|
+
data.tar.gz: cf675f5a88e46e01a795c7e1689c530e5614255c01117f0d8049679265c1a3da050a97aec3d12eca5b4bb41bce968dc5d5c1bb2f4a15ea67e6988d67ff64da5b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex.rb
CHANGED
@@ -360,19 +360,35 @@ EOF
|
|
360
360
|
|
361
361
|
if @raw_header then
|
362
362
|
header = @raw_header[/<?polyrex (.*)?>/,1]
|
363
|
-
a = header.scan(
|
364
|
-
|
365
|
-
|
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 |
|
374
|
-
|
375
|
-
|
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('<', '<').gsub('>','>')
|
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.
|
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:
|
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
|