polyrex 0.8.34 → 0.8.35
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.rb +21 -13
- data.tar.gz.sig +0 -0
- 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: 57ff9750c2b16ed4928b43bf543af269d642448e
|
4
|
+
data.tar.gz: 7a344815c39c0cf52e2d15ec6f8c4a2126eff871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 596141d1b84122f171e7c3bba8be8f2633501025757494cde9b86af04d6dc61e9f86982788b41f31cdf44df6351c3a35119e52d93918d48bc3b358d0ca81cd81
|
7
|
+
data.tar.gz: 37f2e9f7380beffd4e2b7a04e41f3cf3ed8d02bf35b674ebf9c39603f31fdad93cab7295fe21b3031057fee0fbe73297aac6a65cd3a1fdedb7257d295ec245a8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/polyrex.rb
CHANGED
@@ -326,8 +326,10 @@ EOF
|
|
326
326
|
end
|
327
327
|
|
328
328
|
@summary.format_mask = @format_masks
|
329
|
-
|
330
|
-
|
329
|
+
records = @parent_node.root
|
330
|
+
@parent_node = records.parent
|
331
|
+
records.delete
|
332
|
+
@parent_node.root.add format_line!( LineTree.new(raw_lines.join("\n").strip).to_a)
|
331
333
|
|
332
334
|
end
|
333
335
|
|
@@ -342,7 +344,9 @@ EOF
|
|
342
344
|
attach_edit_handlers(@objects)
|
343
345
|
end
|
344
346
|
|
345
|
-
def format_line!(
|
347
|
+
def format_line!(a, i=0)
|
348
|
+
|
349
|
+
records = Rexle::Element.new('records')
|
346
350
|
|
347
351
|
a.each do |x|
|
348
352
|
|
@@ -376,13 +380,14 @@ EOF
|
|
376
380
|
summary.add ynode
|
377
381
|
next
|
378
382
|
end
|
379
|
-
|
383
|
+
|
380
384
|
unless @format_masks[i][/^\(.*\)$/] then
|
381
|
-
|
382
|
-
@field_names, field_values = RXRawLineParser.new(format_masks[i])
|
385
|
+
|
386
|
+
@field_names, field_values = RXRawLineParser.new(format_masks[i])\
|
387
|
+
.parse(line)
|
383
388
|
|
384
389
|
else
|
385
|
-
|
390
|
+
|
386
391
|
format_masks = @format_masks[i][1..-2].split('|')
|
387
392
|
patterns = format_masks.map do |x|
|
388
393
|
regexify_fmask(x) #.sub(/\[/,'\[').sub(/\]/,'\]')
|
@@ -391,7 +396,8 @@ EOF
|
|
391
396
|
pattern = patterns.detect {|x| line.match(/#{x}/)}
|
392
397
|
i = patterns.index(pattern)
|
393
398
|
|
394
|
-
@field_names = format_masks[i].to_s.scan(/\[!(\w+)\]/)
|
399
|
+
@field_names = format_masks[i].to_s.scan(/\[!(\w+)\]/)\
|
400
|
+
.flatten.map(&:to_sym)
|
395
401
|
|
396
402
|
field_values = line.match(/#{pattern}/).captures
|
397
403
|
|
@@ -415,19 +421,21 @@ EOF
|
|
415
421
|
end
|
416
422
|
|
417
423
|
format_mask = @format_masks[i]
|
424
|
+
|
418
425
|
if @type == 'checklist' then
|
419
426
|
format_mask = format_mask.sub(/999999999/,' ')
|
420
427
|
end
|
428
|
+
|
421
429
|
summary.add Rexle::Element.new('format_mask').add_text(format_mask)
|
422
430
|
|
423
|
-
new_records = Rexle::Element.new('records')
|
424
|
-
|
425
431
|
record.add summary
|
426
|
-
|
432
|
+
child_records = format_line!(x, i+1) unless x.empty?
|
433
|
+
|
434
|
+
record.add child_records
|
427
435
|
records.add record
|
428
|
-
|
429
|
-
format_line!(summary, new_records, x, i+1) unless x.empty?
|
430
436
|
end
|
437
|
+
|
438
|
+
records
|
431
439
|
end
|
432
440
|
|
433
441
|
# -- end of full text edit methods
|
data.tar.gz.sig
CHANGED
Binary file
|
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.8.
|
4
|
+
version: 0.8.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
7hfiCsNv+0o/OwBNlpn8pTTpd3jV6o1Qq0Y7QiFomKd6XWlaHT4ZNtZdb/XTpC7W
|
30
30
|
ZUZv+oXV5L4FrLlOrnTUhA+cZRntSyHs
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-09
|
32
|
+
date: 2013-11-09 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: polyrex-schema
|
metadata.gz.sig
CHANGED
Binary file
|