teodoro 0.7.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: 948116a90b820e721da13b71f2abee576b7154819653eecf1ef63452b9375c9b
4
- data.tar.gz: c23144f5cae471db91509309da02f1b611218082ba3af45bfc31b7d6b2ae74d6
3
+ metadata.gz: 345feac649f9964beffbb9200c2d19281413f03e4950aa440d6208a189f6c337
4
+ data.tar.gz: b30953d58a711b552b936ffccb125792a548e3fd00075b0e52f7b37473224a04
5
5
  SHA512:
6
- metadata.gz: bf4ed05a27bc7ecde19dbd6a98115d464d736d3a2da197a37240e42946bd3df40ed4e55d0a96cdbde81321558f3659656aeea1b99114ef66daf360abd0430460
7
- data.tar.gz: f6a047db79b4da62c8b6783765e4e398fe15ae07ed99dfd55a9eefcd48b0f783bdd782d333af98fc94f1784448f2fa0f3c13fb4955f95ef8fbe3ba409cbbeb85
6
+ metadata.gz: e02f37a099b65f6fe97f7d888c25638bcfc6e5cd48ea4512d353b3952188f76c547b17b4e72a27b7979d4c0765ab602e65c80b81e2d8ff7903376ec4d6ab61e8
7
+ data.tar.gz: 86d96c5129045d68f65ebfa4a6cdc4ff942185f3510b2a7c32af7b6fdc74661c26bd8a0154f8c7d14c309f7e6c21daeffc42f7b1e28fbec0ad9c645743d2890b
@@ -18,11 +18,11 @@ module Teodoro
18
18
  end
19
19
 
20
20
  def versao_do_aplicativo_de_processamento_do_evento
21
- @versao_do_aplicativo_de_processamento_do_evento ||= recibo['retornoEvento/processamento/versaoAppProcessamento']
21
+ @versao_do_aplicativo_de_processamento_do_evento ||= recibo['processamento/versaoAppProcessamento']
22
22
  end
23
23
 
24
24
  def numero_do_recibo
25
- @numero_do_recibo ||= recibo['retornoEvento/recibo/nrRecibo']
25
+ @numero_do_recibo ||= recibo['recibo/nrRecibo']
26
26
  end
27
27
  end
28
28
  end
@@ -15,7 +15,7 @@ module Teodoro
15
15
  end
16
16
 
17
17
  def tipo_de_inscricao_do_empregador
18
- @tipo_de_inscricao_do_empregador ||= evento["#{noh_principal_do_evento}/ideEmpregador/tpInsc"]
18
+ @tipo_de_inscricao_do_empregador ||= evento['ideEmpregador/tpInsc']
19
19
  end
20
20
 
21
21
  class Valor
@@ -12,11 +12,11 @@ module Teodoro
12
12
  private
13
13
 
14
14
  def alteracao?
15
- @alteracao ||= evento[noh_principal_do_evento, noh_de_informacoes_do_evento, 'alteracao']
15
+ @alteracao ||= evento[noh_de_informacoes_do_evento, 'alteracao']
16
16
  end
17
17
 
18
18
  def exclusao?
19
- @exclusao ||= evento[noh_principal_do_evento, noh_de_informacoes_do_evento, 'exclusao']
19
+ @exclusao ||= evento[noh_de_informacoes_do_evento, 'exclusao']
20
20
  end
21
21
 
22
22
  def deletar_arquivo_data_original
@@ -24,7 +24,7 @@ module Teodoro
24
24
  end
25
25
 
26
26
  def inicio_da_validade_original
27
- evento[noh_principal_do_evento, noh_de_informacoes_do_evento, '*', noh_de_identificacao_do_periodo, 'iniValid']
27
+ evento[noh_de_informacoes_do_evento, '*', noh_de_identificacao_do_periodo, 'iniValid']
28
28
  end
29
29
 
30
30
  def obter_caminho_do_arquivo_data(inicio_da_validade)
@@ -48,14 +48,14 @@ module Teodoro
48
48
  def validade
49
49
  @validade ||=
50
50
  if inclusao? || (alteracao? && !nova_validade?)
51
- evento[noh_principal_do_evento, noh_de_informacoes_do_evento, '*', noh_de_identificacao_do_periodo]
51
+ evento[noh_de_informacoes_do_evento, '*', noh_de_identificacao_do_periodo]
52
52
  elsif alteracao?
53
53
  nova_validade
54
54
  end
55
55
  end
56
56
 
57
57
  def inclusao?
58
- @inclusao ||= evento[noh_principal_do_evento, noh_de_informacoes_do_evento, 'inclusao']
58
+ @inclusao ||= evento[noh_de_informacoes_do_evento, 'inclusao']
59
59
  end
60
60
 
61
61
  def nova_validade?
@@ -63,7 +63,7 @@ module Teodoro
63
63
  end
64
64
 
65
65
  def nova_validade
66
- @nova_validade ||= evento[noh_principal_do_evento, noh_de_informacoes_do_evento, 'alteracao', 'novaValidade']
66
+ @nova_validade ||= evento[noh_de_informacoes_do_evento, 'alteracao', 'novaValidade']
67
67
  end
68
68
 
69
69
  def fim_da_validade
@@ -5,11 +5,11 @@ module Teodoro
5
5
  private
6
6
 
7
7
  def id_do_evento
8
- evento.css(noh_principal_do_evento).first.attributes['Id'].value
8
+ evento.css('/*').first.attributes['Id'].value
9
9
  end
10
10
 
11
11
  def processo_de_emissao_do_evento
12
- evento["#{noh_principal_do_evento}/ideEvento/procEmi"]
12
+ evento['ideEvento/procEmi']
13
13
  end
14
14
 
15
15
  def criar_caminho_do_arquivo_data(nome_do_arquivo)
@@ -9,7 +9,7 @@ module Teodoro
9
9
  end
10
10
 
11
11
  def arquivo_xml_de_retificacao
12
- @arquivo_xml_de_retificacao ||= arquivos_xml_por_recibo_a_retificar[numero_do_recibo]
12
+ @arquivo_xml_de_retificacao ||= arquivos_xml_por_recibo_a_retificar.delete(numero_do_recibo)
13
13
  end
14
14
 
15
15
  def arquivos_xml_por_recibo_a_retificar
@@ -14,13 +14,13 @@ module Teodoro
14
14
  public
15
15
 
16
16
  def descompactar
17
- Console.print "descompactando #{File.basename(caminho)}..."
18
-
19
- Zip::File.open(caminho) do |zip|
20
- zip
21
- .reject { |entrada| entrada.name[-8] == PREFIXO_DE_TOTALIZADOR }
22
- .each do |entrada|
23
- entrada.extract(File.join(destino_dos_arquivos_xml, entrada.name))
17
+ Console.print "descompactando #{File.basename(caminho)}..." do
18
+ Zip::File.open(caminho) do |zip|
19
+ zip
20
+ .reject { |entrada| entrada.name[-8] == PREFIXO_DE_TOTALIZADOR }
21
+ .each do |entrada|
22
+ entrada.extract(File.join(destino_dos_arquivos_xml, entrada.name))
23
+ end
24
24
  end
25
25
  end
26
26
  end
@@ -59,17 +59,13 @@ module Teodoro
59
59
 
60
60
  # otimizacao do gerenciamento de memoria
61
61
  def carregar
62
- Console.print "carregando #{nome}.xml..."
62
+ Console.print "carregando #{nome}.xml..." do
63
+ evento, recibo = carregar_evento_e_recibo
63
64
 
64
- evento, recibo =
65
- carregar_xml
66
- .then do |xml|
67
- %w[evento recibo].map { XML.new(Nokogiri::XML(xml.css("eSocial/retornoProcessamentoDownload/#{_1}/*").to_s)) }
68
- end
69
-
70
- @retificacao = TIPOS_DE_EVENTO_RETIFICAVEIS.include?(tipo_de_evento) && evento['*/ideEvento/indRetif'] == '2'
71
- @numero_do_recibo_a_retificar = evento['*/ideEvento/nrRecibo'] if retificacao?
72
- @momento_de_processamento_pelo_e_social = recibo['retornoEvento/processamento/dhProcessamento']
65
+ @retificacao = TIPOS_DE_EVENTO_RETIFICAVEIS.include?(tipo_de_evento) && evento['ideEvento/indRetif'] == '2'
66
+ @numero_do_recibo_a_retificar = evento['ideEvento/nrRecibo'] if retificacao?
67
+ @momento_de_processamento_pelo_e_social = recibo['processamento/dhProcessamento']
68
+ end
73
69
  end
74
70
 
75
71
  def retificacao?
@@ -85,14 +81,22 @@ module Teodoro
85
81
  end
86
82
 
87
83
  def processar
88
- Console.print "processando #{nome}.xml..."
89
-
90
- validar_versao_do_leiaute
91
- processar_arquivo
84
+ Console.print "processando #{nome}.xml..." do
85
+ validar_versao_do_leiaute
86
+ processar_arquivo
87
+ end
92
88
  end
93
89
 
94
90
  private
95
91
 
92
+ def carregar_evento_e_recibo
93
+ carregar_xml
94
+ .then do |xml|
95
+ %w[evento recibo]
96
+ .map { XML.new(Nokogiri::XML(xml.css("eSocial/retornoProcessamentoDownload/#{_1}/*/*").to_s)) }
97
+ end
98
+ end
99
+
96
100
  def carregar_xml
97
101
  Nokogiri::XML(carregar_conteudo)
98
102
  end
@@ -114,7 +118,7 @@ module Teodoro
114
118
  end
115
119
 
116
120
  def namespace_do_evento
117
- xml_do_evento.css('eSocial')[0].namespace.href
121
+ xml_do_evento.css('/eSocial')[0].namespace.href
118
122
  end
119
123
 
120
124
  def xml_do_evento
@@ -141,7 +145,7 @@ module Teodoro
141
145
  end
142
146
 
143
147
  def evento
144
- XML.new(xml_do_evento)
148
+ XML.new(Nokogiri::XML(xml_do_evento.css('*/*').to_s))
145
149
  end
146
150
 
147
151
  def recibo
@@ -149,7 +153,7 @@ module Teodoro
149
153
  end
150
154
 
151
155
  def xml_do_recibo
152
- Nokogiri::XML(xml.css('eSocial/retornoProcessamentoDownload/recibo/*').to_s)
156
+ Nokogiri::XML(xml.css('eSocial/retornoProcessamentoDownload/recibo/*/*').to_s)
153
157
  end
154
158
  end
155
159
  end
@@ -1,5 +1,7 @@
1
1
  module Console
2
- def self.print(string = nil)
2
+ def self.print(string)
3
3
  Kernel.print "\r\e[2K#{string}"
4
+ yield
5
+ Kernel.print "\r\e[2K"
4
6
  end
5
7
  end
@@ -41,7 +41,6 @@ module Teodoro
41
41
  classificar_arquivos_xml
42
42
  ordenar_arquivos_xml
43
43
  processar_arquivos_xml
44
- limpar_linha_de_feedback
45
44
  end
46
45
 
47
46
  def destino_dos_arquivos_data
@@ -106,20 +105,21 @@ module Teodoro
106
105
  end
107
106
 
108
107
  def classificar_arquivos_xml
109
- Console.print 'classificando os arquivos XML...'
110
-
111
- arquivos_xml
112
- .select(&:processavel?)
113
- .partition(&:retificacao?)
114
- .then do |de_retificacao, exceto_de_retificacao|
115
- @arquivos_xml_por_recibo_a_retificar = de_retificacao.map { [_1.numero_do_recibo_a_retificar, _1] }.to_h
116
- @arquivos_xml = exceto_de_retificacao
108
+ Console.print 'classificando os arquivos XML...' do
109
+ arquivos_xml
110
+ .select(&:processavel?)
111
+ .partition(&:retificacao?)
112
+ .then do |de_retificacao, exceto_de_retificacao|
113
+ @arquivos_xml_por_recibo_a_retificar = de_retificacao.map { [_1.numero_do_recibo_a_retificar, _1] }.to_h
114
+ @arquivos_xml = exceto_de_retificacao
115
+ end
117
116
  end
118
117
  end
119
118
 
120
119
  def ordenar_arquivos_xml
121
- Console.print 'ordenando os arquivos XML...'
122
- arquivos_xml.sort_by! { [_1.momento_de_processamento_pelo_e_social, _1.nome] }
120
+ Console.print 'ordenando os arquivos XML...' do
121
+ arquivos_xml.sort_by! { [_1.momento_de_processamento_pelo_e_social, _1.nome] }
122
+ end
123
123
  end
124
124
 
125
125
  def processar_arquivos_xml
@@ -127,10 +127,6 @@ module Teodoro
127
127
  arquivos_xml.shift.processar while arquivos_xml.any?
128
128
  end
129
129
 
130
- def limpar_linha_de_feedback
131
- Console.print
132
- end
133
-
134
130
  class ArquivosData
135
131
  private
136
132
 
@@ -5,10 +5,6 @@ module Teodoro
5
5
 
6
6
  private
7
7
 
8
- def noh_principal_do_evento
9
- 'evtInfoEmpregador'
10
- end
11
-
12
8
  def noh_de_informacoes_do_evento
13
9
  'infoEmpregador'
14
10
  end
@@ -52,7 +48,7 @@ module Teodoro
52
48
  end
53
49
 
54
50
  def numero_de_inscricao
55
- @numero_de_inscricao ||= evento['evtInfoEmpregador/ideEmpregador/nrInsc']
51
+ @numero_de_inscricao ||= evento['ideEmpregador/nrInsc']
56
52
  end
57
53
 
58
54
  def cnpj_raiz
@@ -79,31 +75,31 @@ module Teodoro
79
75
  ['RetornoAction'],
80
76
  ['ehOrgaoPublico', [orgao_publico?, :bool]],
81
77
  ['ehOrgaoPublicoUniao', [orgao_publico?, :bool]],
82
- ['ehOrgaoPublicoEstadualMunicipalDistrital', [evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP/infoEnte'], :bool]],
78
+ ['ehOrgaoPublicoEstadualMunicipalDistrital', [evento['infoEmpregador/*/infoCadastro/infoOP/infoEnte'], :bool]],
83
79
  ['ExibeModoCompleto'],
84
80
  ['InicioValidade', [inicio_da_validade, :mes_ano]],
85
81
  ['FimValidade', [fim_da_validade, :mes_ano]],
86
82
  ['NomeRazaoSocial', nome_ou_razao_social],
87
- ['ClassificacaoTributaria', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/classTrib']],
88
- ['NaturezaJuridica', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/natJurid']],
89
- ['IndicativoRegEletronico', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indOptRegEletron']],
90
- ['IndicativoCooperativa', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indCoop']],
91
- ['IndicativoConstrutora', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indConstr']],
92
- ['IndicativoDesoneracaoFolha', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indDesFolha']],
93
- ['IndicativoEntidadeEducativa', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indEntEd']],
94
- ['IndicativoEmpresaTrabalhoTemporario', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/indEtt']],
95
- ['CpfContato', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/cpfCtt']],
96
- ['NomeContato', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/nmCtt']],
97
- ['TelefoneFixo', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/foneFixo']],
98
- ['TelefoneCelular', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/foneCel']],
99
- ['Email', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/contato/email']],
83
+ ['ClassificacaoTributaria', evento['infoEmpregador/*/infoCadastro/classTrib']],
84
+ ['NaturezaJuridica', evento['infoEmpregador/*/infoCadastro/natJurid']],
85
+ ['IndicativoRegEletronico', evento['infoEmpregador/*/infoCadastro/indOptRegEletron']],
86
+ ['IndicativoCooperativa', evento['infoEmpregador/*/infoCadastro/indCoop']],
87
+ ['IndicativoConstrutora', evento['infoEmpregador/*/infoCadastro/indConstr']],
88
+ ['IndicativoDesoneracaoFolha', evento['infoEmpregador/*/infoCadastro/indDesFolha']],
89
+ ['IndicativoEntidadeEducativa', evento['infoEmpregador/*/infoCadastro/indEntEd']],
90
+ ['IndicativoEmpresaTrabalhoTemporario', evento['infoEmpregador/*/infoCadastro/indEtt']],
91
+ ['CpfContato', evento['infoEmpregador/*/infoCadastro/contato/cpfCtt']],
92
+ ['NomeContato', evento['infoEmpregador/*/infoCadastro/contato/nmCtt']],
93
+ ['TelefoneFixo', evento['infoEmpregador/*/infoCadastro/contato/foneFixo']],
94
+ ['TelefoneCelular', evento['infoEmpregador/*/infoCadastro/contato/foneCel']],
95
+ ['Email', evento['infoEmpregador/*/infoCadastro/contato/email']],
100
96
  ['SoftwareHouseTela_CnpjSoftwareHouse'],
101
97
  ['SoftwareHouseTela_NomeRazaoSocial'],
102
98
  ['SoftwareHouseTela_NomeContato'],
103
99
  ['SoftwareHouseTela_Telefone'],
104
100
  ['SoftwareHouseTela_Email'],
105
- ['IndicativoSituacaoPF', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoComplementares/situacaoPF/indSitPF']],
106
- ['IndicativoSituacaoPJ', evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoComplementares/situacaoPJ/indSitPJ']],
101
+ ['IndicativoSituacaoPF', evento['infoEmpregador/*/infoCadastro/infoComplementares/situacaoPF/indSitPF']],
102
+ ['IndicativoSituacaoPJ', evento['infoEmpregador/*/infoCadastro/infoComplementares/situacaoPJ/indSitPJ']],
107
103
  ['IdEventoXml', id_do_evento],
108
104
  ['NrReciboEventoOriginal', numero_do_recibo],
109
105
  ['DescricaoProcEmi', processo_de_emissao_do_evento],
@@ -126,15 +122,15 @@ module Teodoro
126
122
  end
127
123
 
128
124
  def nome_ou_razao_social
129
- @nome_ou_razao_social ||= evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/nmRazao']
125
+ @nome_ou_razao_social ||= evento['infoEmpregador/*/infoCadastro/nmRazao']
130
126
  end
131
127
 
132
128
  def orgao_publico?
133
- @orgao_publico ||= evento['evtInfoEmpregador/infoEmpregador/*/infoCadastro/infoOP']
129
+ @orgao_publico ||= evento['infoEmpregador/*/infoCadastro/infoOP']
134
130
  end
135
131
 
136
132
  def softwares_house
137
- evento.*('evtInfoEmpregador/infoEmpregador/*/infoCadastro/softwareHouse')
133
+ evento.*('infoEmpregador/*/infoCadastro/softwareHouse')
138
134
  end
139
135
  end
140
136
  end
@@ -5,10 +5,6 @@ module Teodoro
5
5
 
6
6
  private
7
7
 
8
- def noh_principal_do_evento
9
- 'evtTabEstab'
10
- end
11
-
12
8
  def noh_de_informacoes_do_evento
13
9
  'infoEstab'
14
10
  end
@@ -18,7 +14,7 @@ module Teodoro
18
14
  end
19
15
 
20
16
  def numero_de_inscricao
21
- @numero_de_inscricao ||= evento['evtTabEstab/infoEstab/*/ideEstab/nrInsc']
17
+ @numero_de_inscricao ||= evento['infoEstab/*/ideEstab/nrInsc']
22
18
  end
23
19
 
24
20
  def noh_de_identificacao_do_periodo
@@ -27,7 +23,6 @@ module Teodoro
27
23
 
28
24
  def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
29
25
  [
30
- # rubocop:disable Layout/LineLength
31
26
  ['RequestVerificationToken'],
32
27
  ['SomenteVisualizacao'],
33
28
  ['BloquearCodigo'],
@@ -35,33 +30,32 @@ module Teodoro
35
30
  ['TipoInscricaoEmpregador', tipo_de_inscricao_do_empregador],
36
31
  ['TipoEmpregador'],
37
32
  ['ContinuandoEdicao'],
38
- ['TipoInscricaoEstabelecimento', evento['evtTabEstab/infoEstab/*/ideEstab/tpInsc']],
33
+ ['TipoInscricaoEstabelecimento', evento['infoEstab/*/ideEstab/tpInsc']],
39
34
  ['NumeroInscricaoEstabelecimento', numero_de_inscricao],
40
35
  ['NomeEstabelecimento'],
41
36
  ['InicioValidade', [inicio_da_validade, :mes_ano]],
42
37
  ['FimValidade', [fim_da_validade, :mes_ano]],
43
- ['TipoCaepf', evento['evtTabEstab/infoEstab/*/dadosEstab/infoCaepf/tpCaepf']],
38
+ ['TipoCaepf', evento['infoEstab/*/dadosEstab/infoCaepf/tpCaepf']],
44
39
  ['CnaePreponderanteCodigoDescricaoAutoComplete'],
45
- ['CnaePreponderante', evento['evtTabEstab/infoEstab/*/dadosEstab/cnaePrep']],
40
+ ['CnaePreponderante', evento['infoEstab/*/dadosEstab/cnaePrep']],
46
41
  ['CnaePreponderantePreenchido'],
47
- ['AliquotaRat', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/aliqRat']],
48
- ['Fap', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/fap']],
49
- ['AliquotaRatAjustada', evento['evtTabEstab/infoEstab/*/dadosEstab/aliqGilrat/aliqRatAjust']],
42
+ ['AliquotaRat', evento['infoEstab/*/dadosEstab/aliqGilrat/aliqRat']],
43
+ ['Fap', evento['infoEstab/*/dadosEstab/aliqGilrat/fap']],
44
+ ['AliquotaRatAjustada', evento['infoEstab/*/dadosEstab/aliqGilrat/aliqRatAjust']],
50
45
  ['FapRecuperado'],
51
46
  ['AliquotaRatRecuperada'],
52
47
  ['DesejaIncluirProcessoAdminJudRat'],
53
48
  ['DesejaIncluirProcessoAdminJudFap'],
54
- ['TipoRegistroPonto', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/regPt']],
55
- ['IndicativoContratacaoAprendiz', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoApr/contApr']],
56
- ['ContratoAprendizEntidade', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoApr/contEntEd']],
49
+ ['TipoRegistroPonto', evento['infoEstab/*/dadosEstab/infoTrab/regPt']],
50
+ ['IndicativoContratacaoAprendiz', evento['infoEstab/*/dadosEstab/infoTrab/infoApr/contApr']],
51
+ ['ContratoAprendizEntidade', evento['infoEstab/*/dadosEstab/infoTrab/infoApr/contEntEd']],
57
52
  ['EntidadeEducativaTela_CnpjEntidadeEducativa'],
58
- ['IndicativoContratacaoDeficiencia', evento['evtTabEstab/infoEstab/*/dadosEstab/infoTrab/infoPCD/contPCD']],
59
- ['IndicativoSubstituicaoPatronalObra', evento['evtTabEstab/infoEstab/*/dadosEstab/infoObra/indSubstPatrObra']],
53
+ ['IndicativoContratacaoDeficiencia', evento['infoEstab/*/dadosEstab/infoTrab/infoPCD/contPCD']],
54
+ ['IndicativoSubstituicaoPatronalObra', evento['infoEstab/*/dadosEstab/infoObra/indSubstPatrObra']],
60
55
  ['IdEventoXml', id_do_evento],
61
56
  ['NrReciboEventoOriginal', numero_do_recibo],
62
57
  ['DescricaoProcEmi', processo_de_emissao_do_evento],
63
58
  ['VerProc', versao_do_aplicativo_de_processamento_do_evento]
64
- # rubocop:enable Layout/LineLength
65
59
  ]
66
60
  end
67
61
  end
@@ -5,10 +5,6 @@ module Teodoro
5
5
 
6
6
  private
7
7
 
8
- def noh_principal_do_evento
9
- 'evtTabRubrica'
10
- end
11
-
12
8
  def noh_de_informacoes_do_evento
13
9
  'infoRubrica'
14
10
  end
@@ -22,11 +18,11 @@ module Teodoro
22
18
  end
23
19
 
24
20
  def identificador_da_tabela_de_rubricas
25
- @identificador_da_tabela_de_rubricas ||= evento['evtTabRubrica/infoRubrica/*/ideRubrica/ideTabRubr']
21
+ @identificador_da_tabela_de_rubricas ||= evento['infoRubrica/*/ideRubrica/ideTabRubr']
26
22
  end
27
23
 
28
24
  def codigo
29
- @codigo ||= evento['evtTabRubrica/infoRubrica/*/ideRubrica/codRubr']
25
+ @codigo ||= evento['infoRubrica/*/ideRubrica/codRubr']
30
26
  end
31
27
 
32
28
  def itens_do_conteudo_do_arquivo_data # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
@@ -41,13 +37,13 @@ module Teodoro
41
37
  ['chkIdTabelaRubrica'],
42
38
  ['IdTabelaRubrica', identificador_da_tabela_de_rubricas],
43
39
  ['IdTabelaRubricaText'],
44
- ['DadosRubrica_Descricao', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/dscRubr']],
45
- ['DadosRubrica_Natureza', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/natRubr']],
46
- ['DadosRubrica_TipoRubrica', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/tpRubr']],
47
- ['DadosRubrica_CodigoIncidenciaPrevidencia', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncCP']],
48
- ['DadosRubrica_CodigoIncidenciaIR', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncIRRF']],
49
- ['DadosRubrica_CodigoIncidenciaFGTS', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncFGTS']],
50
- ['DadosRubrica_CodigoIncidenciaSindical', evento['evtTabRubrica/infoRubrica/*/dadosRubrica/codIncSIND']],
40
+ ['DadosRubrica_Descricao', evento['infoRubrica/*/dadosRubrica/dscRubr']],
41
+ ['DadosRubrica_Natureza', evento['infoRubrica/*/dadosRubrica/natRubr']],
42
+ ['DadosRubrica_TipoRubrica', evento['infoRubrica/*/dadosRubrica/tpRubr']],
43
+ ['DadosRubrica_CodigoIncidenciaPrevidencia', evento['infoRubrica/*/dadosRubrica/codIncCP']],
44
+ ['DadosRubrica_CodigoIncidenciaIR', evento['infoRubrica/*/dadosRubrica/codIncIRRF']],
45
+ ['DadosRubrica_CodigoIncidenciaFGTS', evento['infoRubrica/*/dadosRubrica/codIncFGTS']],
46
+ ['DadosRubrica_CodigoIncidenciaSindical', evento['infoRubrica/*/dadosRubrica/codIncSIND']],
51
47
  ['IdEventoXml'],
52
48
  ['NrReciboEventoOriginal'],
53
49
  ['DescricaoProcEmi'],