Refactor parsers into subclasses, fix SOAP envelope, add specs#19
Merged
Conversation
Parser refactor: - Replace ResponseParser with Base + Autorizacao, Status, Consulta, Inutilizacao subclasses, each with a single #parse method - Update client.rb to use new parser classes SOAP fixes: - Fix SOAPAction in webservices/status.rb (nfcomStatusServicoNF) - Fix montar_envelope in webservices/base.rb: use soap: prefix instead of soap12:, wrap body with nfcomDadosMsg, run through XmlCleaner - Fix consulta.rb: use nfcomDadosMsg wrapper, add missing xServ field DANFE-COM: - Disable prawn-svg web requests (enable_web_requests: false) in both pdf.svg call sites Specs: - Add shared contexts for mocked certificate and default configuration - Add parser specs for all four subclasses - Add webservice specs for status and consulta - Update autorizacao and signature specs to use shared contexts - Update client_spec to use new parser class names - Add model specs for Emitente and Destinatario - Add DanfeCom builder spec with synthetic fixture XML - Delete response_parser_spec.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parser refactor:
SOAP fixes:
DANFE-COM:
Specs: