dynarex 1.2.32 → 1.2.33
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.tar.gz.sig +2 -3
- data/lib/dynarex.rb +12 -20
- 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: 007f9256cc2be2e0319e6fddeeaeaff9f3c19772
|
4
|
+
data.tar.gz: ae1cfe5d1ac8290fbc8f02e7cc383c5f3b4d87ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bc9f0aa674008e38bc35c9e9d517836ef3327a9ba9cc90c6e18f17c6d16749fb050a984e70468c02772d8c2882c9932c3cb0305988e3309003c849bd018aa5f
|
7
|
+
data.tar.gz: 4c60bb3cff65d38574ee9ff2ba93086effe4c0aee0cb3bbaba0d56888b39fea4581d2b6728cdabe020f33a79e0dac33bac8a8d1db034dd28cf6cdfd775f8bbdb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
����_͒7�x
|
1
|
+
XQC��O�C鳝��J��w��,x���Ԓ�����=֏� .H�0��퇜��_�R�R�
|
2
|
+
�����mZ��Sъ�ЏщTX�����_`0^̌x����L���e�qi��.�Gc��Z^(��l4�S�\�������^$�x�n`���v�ݴ�[�y�A�x/yӍ��Q{`�0�-�zD�&1L�k��˚�)"'�G�Zw9��1�n9���Bb�su$�I�j�4B�E�r�e}@M|�O���z��
|
data/lib/dynarex.rb
CHANGED
@@ -504,8 +504,7 @@ EOF
|
|
504
504
|
|
505
505
|
#buffer = rowx if rowx
|
506
506
|
|
507
|
-
raw_lines = buffer.gsub(/^\s*#[^\n]+/,'').
|
508
|
-
.strip.split(/\r?\n|\r(?!\n)/)
|
507
|
+
raw_lines = buffer.gsub(/^\s*#[^\n]+/,'').lines
|
509
508
|
|
510
509
|
if raw_summary then
|
511
510
|
a_summary = raw_summary.split(',').map(&:strip)
|
@@ -550,8 +549,10 @@ EOF
|
|
550
549
|
@summary[:recordx_type] = 'dynarex'
|
551
550
|
@summary[:schema] = @schema
|
552
551
|
@summary[:format_mask] = @format_mask
|
552
|
+
|
553
|
+
raw_lines.shift
|
553
554
|
|
554
|
-
lines = case raw_lines.first
|
555
|
+
lines = case raw_lines.first.chomp
|
555
556
|
|
556
557
|
when '---'
|
557
558
|
|
@@ -573,23 +574,12 @@ EOF
|
|
573
574
|
yprocs[yaml.class.to_s.to_sym].call yaml
|
574
575
|
|
575
576
|
when '--+'
|
576
|
-
|
577
|
+
|
577
578
|
self.summary[:rawdoc_type] = 'rowx'
|
578
|
-
raw_lines.shift
|
579
|
-
|
580
|
-
key = raw_lines.first[/^[^:]+/]
|
581
|
-
populated_lines = raw_lines.inject([]) do |r,x|
|
582
|
-
x[/^#{key}:/] ? r << [x] : r.last << x; r
|
583
|
-
end
|
584
579
|
|
585
|
-
|
586
|
-
populated_lines.each do |line|
|
587
|
-
line << field.to_s + ':' if line.grep(/^#{field.to_s}:/).empty?
|
588
|
-
end
|
589
|
-
end
|
580
|
+
raw_lines.shift
|
590
581
|
|
591
|
-
|
592
|
-
a3 = populated_lines.map{|x| x.join("\n")}
|
582
|
+
a3 = raw_lines.join.gsub(/^\-+$/,'').split(/\n\n/)
|
593
583
|
# get the fields
|
594
584
|
a4 = a3.map{|x| x.scan(/\w+(?=:)/)}.flatten(1).uniq
|
595
585
|
a5 = a3.map do |xlines|
|
@@ -601,9 +591,11 @@ EOF
|
|
601
591
|
|
602
592
|
end
|
603
593
|
|
604
|
-
xml = RowX.new(a5.join("\n
|
605
|
-
a2 = Rexle.new(xml).root.xpath('item').inject([]) do |r,x|
|
606
|
-
r << @fields.map
|
594
|
+
xml = RowX.new(a5.join("\n")).to_xml
|
595
|
+
a2 = Rexle.new(xml).root.xpath('item').inject([]) do |r,x|
|
596
|
+
r << @fields.map do |field|
|
597
|
+
x.text(a4.all? {|x| x.length > 1} ? field.to_s : field.to_s.chr)
|
598
|
+
end
|
607
599
|
end
|
608
600
|
|
609
601
|
# if there is no field value for the first field then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynarex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
kUea9jZD+xTq1Js9t2BHCz3Ev/sgS7CaijrbQetbNwzasFGHRd30xBEwd4zANQOp
|
30
30
|
i0OBH0e4iIMkv+Q+PYlNRnlpQogsAdTs
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-08-
|
32
|
+
date: 2013-08-08 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rexle
|
metadata.gz.sig
CHANGED
Binary file
|