teodoro 0.59.0 → 0.59.1
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 +4 -4
- data/lib/teodoro/arquivo_de_evento_nao_periodico.rb +2 -2
- data/lib/teodoro/empresa/arquivo_data_rub.rb +1 -2
- data/lib/teodoro/empresa.rb +14 -0
- data/lib/teodoro/leiaute/arquivo_s1010.rb +1 -1
- data/lib/teodoro/leiaute/arquivo_s2300.rb +1 -1
- data/lib/teodoro/leiaute/arquivo_s2306.rb +1 -1
- data/lib/teodoro/version.rb +1 -1
- data/lib/teodoro.rb +3 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 494a77b49bb883ae777a97ce092eb6d2b92308fc98775da3558f2a516f54bc55
|
4
|
+
data.tar.gz: 99f67c5e7cdca4f048a80cb9892683d82087b649492457763ffbfad74f0e4cb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55093cbbbf718d106d6dbbe9543445b2508b1f09efb2c983cd1d79822b6c6f23900a9d21fee2ed939656761bdb20bf294c096bec139208a1d5fa3b436c1c9385
|
7
|
+
data.tar.gz: 8d0a3b5e61eff8df68e171a91f1f83a5c207d148b7a9d4de5fe3aabe9e9d75375daa9cbebbdfee68a7aac327e196d1186cd44673f81581761e7005bf1d0e1a57
|
@@ -3,7 +3,7 @@ module Teodoro
|
|
3
3
|
include ArquivoDeEvento
|
4
4
|
|
5
5
|
def processar
|
6
|
-
return if
|
6
|
+
return if excluido?
|
7
7
|
|
8
8
|
if retificado?
|
9
9
|
processar_retificacao
|
@@ -14,7 +14,7 @@ module Teodoro
|
|
14
14
|
|
15
15
|
private
|
16
16
|
|
17
|
-
def
|
17
|
+
def excluido?
|
18
18
|
empresa.recibos_dos_eventos_excluidos.include?(numero_do_recibo)
|
19
19
|
end
|
20
20
|
|
data/lib/teodoro/empresa.rb
CHANGED
@@ -50,6 +50,7 @@ module Teodoro
|
|
50
50
|
ordenar_arquivos_xml
|
51
51
|
validar_que_primeiro_arquivo_xml_eh_s1000
|
52
52
|
processar_arquivos_xml
|
53
|
+
validar_que_nao_houve_evento_de_retificacao_sem_inclusao_correspondente
|
53
54
|
salvar_arquivo_de_dados_gerais
|
54
55
|
processar_cargos_gerados
|
55
56
|
processar_funcoes_geradas
|
@@ -194,6 +195,19 @@ module Teodoro
|
|
194
195
|
arquivos_xml.shift.processar while arquivos_xml.any?
|
195
196
|
end
|
196
197
|
|
198
|
+
def validar_que_nao_houve_evento_de_retificacao_sem_inclusao_correspondente
|
199
|
+
return if arquivo_xml_por_recibo_de_evento_retificado.empty?
|
200
|
+
|
201
|
+
puts ''
|
202
|
+
puts [
|
203
|
+
'Erro! Evento(s) de retificação sem inclusão correspondente:',
|
204
|
+
*arquivo_xml_por_recibo_de_evento_retificado
|
205
|
+
.values
|
206
|
+
.map { "#{_1.nome}.xml" }
|
207
|
+
].map { Rainbow(_1).red }
|
208
|
+
exit
|
209
|
+
end
|
210
|
+
|
197
211
|
def salvar_arquivo_de_dados_gerais
|
198
212
|
arquivo_de_dados_gerais.salvar
|
199
213
|
end
|
data/lib/teodoro/version.rb
CHANGED
data/lib/teodoro.rb
CHANGED
@@ -18,8 +18,7 @@ module Teodoro
|
|
18
18
|
.then { File.join(_1, 'CBOs.json') }
|
19
19
|
.then { File.read(_1) }
|
20
20
|
.then { JSON.parse(_1) }
|
21
|
-
.
|
22
|
-
.to_h
|
21
|
+
.to_h { [_1['codigo'], _1['titulo']] }
|
23
22
|
.freeze
|
24
23
|
|
25
24
|
Municipios = __FILE__
|
@@ -27,8 +26,7 @@ module Teodoro
|
|
27
26
|
.then { File.join(_1, 'municipios.json') }
|
28
27
|
.then { File.read(_1) }
|
29
28
|
.then { JSON.parse(_1) }
|
30
|
-
.
|
31
|
-
.to_h
|
29
|
+
.to_h { [_1['codigo'], _1['nome']] }
|
32
30
|
.freeze
|
33
31
|
|
34
32
|
TiposDeLogradouro = __FILE__
|
@@ -36,8 +34,7 @@ module Teodoro
|
|
36
34
|
.then { File.join(_1, 'tipos_de_logradouro.json') }
|
37
35
|
.then { File.read(_1) }
|
38
36
|
.then { JSON.parse(_1) }
|
39
|
-
.
|
40
|
-
.to_h
|
37
|
+
.to_h { [_1['codigo'], _1['descricao']] }
|
41
38
|
.freeze
|
42
39
|
|
43
40
|
def self.call(args)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teodoro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.59.
|
4
|
+
version: 0.59.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fortes Tecnologia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
|
-
rubygems_version: 3.4.
|
153
|
+
rubygems_version: 3.4.10
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: ''
|