Disable EDI message validation pending GIR segment support
authorBill Erickson <berick@esilibrary.com>
Fri, 27 Jul 2012 13:05:40 +0000 (09:05 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 16 Aug 2012 14:47:58 +0000 (10:47 -0400)
The edi4r standards module (edi4r/standards.rb) does not recognize GIR
segments as valid.  Until I can resolve that, disable the validator when
finalizing our EDI messages.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
lib/edi/mapper.rb

index 7a61a61..21a94b5 100644 (file)
@@ -198,7 +198,11 @@ module EDI::E
     
     def finalize
       mode = @ic.output_mode
-      @ic = EDI::E::Interchange.parse(StringIO.new(@ic.to_s))
+      # XXX skip validation until GIR segments are fully supported in edi4r
+      # edi4r/edifact.rb:validate fails when calling edi4r/diagrams.rb:seek
+      # on the GIR segment, claiming that it cannot find it in the diagram.
+      # note, however, that the GIR segments are properly built by edi4r.
+      @ic = EDI::E::Interchange.parse(StringIO.new(@ic.to_s), false)
       @ic.output_mode = mode
       return self
     end
@@ -261,4 +265,4 @@ module EDI::E
     
   end
   
-end
\ No newline at end of file
+end