dynarex 1.2.52 → 1.2.53

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: ebdb32b21f425a446f0b8a699d42059a6f7efe79
4
- data.tar.gz: bb80090c325c1d5cb040af3919a085dcafcd4be3
3
+ metadata.gz: e446b23c5ed0741e769621e2bc06f8cb0ddbd22f
4
+ data.tar.gz: f0ceed0e9282d7501eec2995a7ea5911adc5e942
5
5
  SHA512:
6
- metadata.gz: 8880097149db0b5806cf7c43ead80fd6a66fe8c3014879630662810b4e6053dfa96bf3469457bf77e12b30b5ae0702c7b3cd176627885329657f8f871d266c9a
7
- data.tar.gz: 6868fc4260ed955a893ceb1c456929aa04eff95f9a28d93b7978bcc207fa0c7c360cd82cd484e09c21d470c2c36d084b44d6b1eeb3bb312bf302307f15dc1290
6
+ metadata.gz: f305bd93f8dd49e681c6af583cb1d6b20852ed82b934c800c3fca0c493706511b1f178a1c7809d50e36687886be4298288a283af26a56ce1fa6a1f6d57b2757d
7
+ data.tar.gz: 238d140bd83f1e60a9b8fa9e8d2e7df3c5ce4450941d0c418429eae24ff5fa56ca382ad591943cbc0ad6f8e964984532f6d6a08273d0f4e99ffe22707c898ca2
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -407,6 +407,7 @@ EOF
407
407
 
408
408
  h = {limit: 11}.merge(opt)
409
409
  doc = Rexle.new(self.to_xslt)
410
+
410
411
  e = doc.element('//xsl:apply-templates[2]')
411
412
  doc2 = Rexle.new "<xsl:sort order='descending' data-type='number' select='@id'/>"
412
413
  e.add doc2.root
@@ -433,7 +434,14 @@ EOF
433
434
  x.add Rexle::Element.new('pubDate').add_text dt.to_s
434
435
  end
435
436
 
437
+ File.open('dynarex.xsl','w'){|f| f.write xslt}
438
+ File.open('dynarex.xml','w'){|f| f.write doc.xml}
436
439
  xml = Rexslt.new(xslt, doc.xml).to_s
440
+ =begin
441
+ xslt = Nokogiri::XSLT(xslt)
442
+ out = xslt.transform(Nokogiri::XML(doc.root.xml))
443
+ =end
444
+
437
445
  Rexle.new("<rss version='2.0'>%s</rss>" % xml).xml(pretty: true)
438
446
  end
439
447
 
@@ -545,7 +553,8 @@ EOF
545
553
 
546
554
  #buffer = rowx if rowx
547
555
 
548
- raw_lines = buffer.gsub(/^\s*#[^\n]+/,'').lines.to_a
556
+ #jr061013 raw_lines = buffer.gsub(/^\s*#[^\n]+/,'').lines.to_a
557
+ raw_lines = buffer.lines.to_a
549
558
 
550
559
  if raw_summary then
551
560
 
@@ -562,7 +571,8 @@ EOF
562
571
  @summary[label] = val
563
572
  end
564
573
  end
565
-
574
+
575
+
566
576
  if @type == 'checklist' then
567
577
 
568
578
  # extract the brackets from the line
@@ -595,7 +605,7 @@ EOF
595
605
  @summary[:format_mask] = @format_mask
596
606
 
597
607
  raw_lines.shift while raw_lines.first.strip.empty?
598
-
608
+
599
609
  lines = case raw_lines.first.chomp
600
610
 
601
611
  when '---'
@@ -622,19 +632,20 @@ EOF
622
632
  self.summary[:rawdoc_type] = 'rowx'
623
633
  raw_lines.shift
624
634
 
625
- a3 = raw_lines.join.strip.gsub(/^\-+$/,'').split(/\n\n/)
635
+ a3 = raw_lines.join.strip.gsub(/^\-+$/,'').split(/\n\n(?=\w+:)/)
626
636
  # get the fields
627
637
  a4 = a3.map{|x| x.scan(/\w+(?=:)/)}.flatten(1).uniq
628
638
  a5 = a3.map do |xlines|
629
639
 
630
640
  missing_fields = a4 - xlines.scan(/^\w+(?=:)/)
631
- r = xlines.lines.map(&:strip)
641
+ #r061013 r = xlines.lines.map(&:strip)
642
+ r = xlines.split(/\n(\w+:.*)/)
632
643
  r += missing_fields.map{|x| x + ":"}
633
644
  r.sort.join("\n")
634
645
 
635
646
  end
636
647
 
637
- xml = RowX.new(a5.join("\n")).to_xml
648
+ xml = RowX.new(a5.join("\n").strip).to_xml
638
649
 
639
650
  a2 = Rexle.new(xml).root.xpath('item').inject([]) do |r,x|
640
651
  r << @fields.map do |field|
@@ -651,10 +662,10 @@ EOF
651
662
  a2
652
663
 
653
664
  else
654
-
665
+ raw_lines = raw_lines.join("\n").gsub(/^\s*#[^\n]+/,'').lines.to_a
655
666
  a2 = raw_lines.map.with_index do |x,i|
656
-
657
- next if x[/^\s+$/]
667
+
668
+ next if x[/^\s+$|\n\s*#/]
658
669
 
659
670
  begin
660
671
 
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.52
4
+ version: 1.2.53
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-09-24 00:00:00.000000000 Z
32
+ date: 2013-10-06 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rexle
metadata.gz.sig CHANGED
Binary file