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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 507bca865436dc06127d13236161cc493aba8ae8
4
- data.tar.gz: 350b95e9f6bdd70e41813bbd2393b06dc67e41fe
3
+ metadata.gz: 007f9256cc2be2e0319e6fddeeaeaff9f3c19772
4
+ data.tar.gz: ae1cfe5d1ac8290fbc8f02e7cc383c5f3b4d87ac
5
5
  SHA512:
6
- metadata.gz: 6d8c6eced93ca5964e271c3311402c9957a531f95001d4ef962fe4b23e6e49827b312a44f9cd8a1a3e714acf751448ec02ea8925ae5071f40ecbfed336d5a025
7
- data.tar.gz: e0ebf7da9b89c6bb132a4b0a5c16cf45aff4f205020bce282c63b6285edcebdddacb8c282da0192f83dfcd750712b6e8320ad4b41c3a8b72d5119f5e5398b99f
6
+ metadata.gz: 3bc9f0aa674008e38bc35c9e9d517836ef3327a9ba9cc90c6e18f17c6d16749fb050a984e70468c02772d8c2882c9932c3cb0305988e3309003c849bd018aa5f
7
+ data.tar.gz: 4c60bb3cff65d38574ee9ff2ba93086effe4c0aee0cb3bbaba0d56888b39fea4581d2b6728cdabe020f33a79e0dac33bac8a8d1db034dd28cf6cdfd775f8bbdb
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ^��B�:��YN���UE6�R$����fq瘢�D
2
- ���{(���[�)d�~Mԁ��}W}P�#z�'�/�W:��D8=�Oxx_)$�Wz
3
- ����_͒7�x
1
+ XQC��OC鳝��J��w��,x���Ԓ�����=֏� .H�0��퇜��_�R�R�
2
+ �����mZ��Sъ�ЏщTX�����_`0^̌x����L���e�qi��.�Gc��Z^(��l4�S�\�������^$�xn`���v�ݴ�[�yA�x/yӍ��Q{`�0�-�zD�&1Lk��˚�)"'�G�Zw9��1n9���Bb�su$�I�j�4B�E�re}@M|�O���z��
@@ -504,8 +504,7 @@ EOF
504
504
 
505
505
  #buffer = rowx if rowx
506
506
 
507
- raw_lines = buffer.gsub(/^\s*#[^\n]+/,'').gsub(/\n\n/,"\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
- @fields.each do |field|
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
- #a3 = txt.split(/(?:\n|^\-+$)\n/)
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\n")).to_xml
605
- a2 = Rexle.new(xml).root.xpath('item').inject([]) do |r,x|
606
- r << @fields.map {|field| x.text(field.to_s) }
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.32
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-07 00:00:00.000000000 Z
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