From 81a8fb589584d460213ae53b8079d999307f85a6 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 27 Jul 2012 09:05:40 -0400 Subject: [PATCH] Disable EDI message validation pending GIR segment support 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 --- lib/edi/mapper.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/edi/mapper.rb b/lib/edi/mapper.rb index 7a61a6184..21a94b5bd 100644 --- a/lib/edi/mapper.rb +++ b/lib/edi/mapper.rb @@ -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 -- 2.11.0