teodoro 0.69.0 → 0.69.2

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: 26c80e3876d1f891f0ac2474b4fb3794fb7a05527443bc884f7c973984d20aa8
4
- data.tar.gz: e96cd3ff86d0e9d785525cf3c2c3b493ae7b405b441dcab7901b6649bacb0628
3
+ metadata.gz: 47f410835b34b223ffbd179bd3da4dbd20f4c4ffb353088672f5532a143b249f
4
+ data.tar.gz: '08f3894a3278f8e57eae810ed3848662326ec1d76b67f15d62580ba6054516e5'
5
5
  SHA512:
6
- metadata.gz: 191e8c53c887d19a5dcb39d6531d5b56ebcbb276d0268002320f780bed29b562d7761b49fe66097af5eaa6c00a99b158aeacc1229e4f8384af4dfa1d3365078a
7
- data.tar.gz: 0dd71ad61403f549cbb86886302480691fc8560d84f14f7f3aee8ec199170504a1e6ebb01a9693c609bc899093ea7a9541b865b7b0704ed322bff7908d5c947f
6
+ metadata.gz: 873c262334c342a0f19d9bf33c0fbf775d4cb82cbcb033244e663d2d04c97b2616ff4a38447270d08cd3e49780aef5f3105c59a1021449cd17d18f31f4b2322e
7
+ data.tar.gz: 687e20af6507a42980c0c0c66b00d36c9e3205b5bee5d602c1369461fc1e055dc58395e1084a7044d5706d70725063cf8fd66353965bed7ed93633ddda902feb
@@ -156,6 +156,7 @@ module Teodoro
156
156
  Console.print "processando #{nome}.xml (#{percentual}%)..." do
157
157
  validar_versao_do_leiaute
158
158
  processar_arquivo
159
+ liberar_memoria
159
160
  end
160
161
  rescue StandardError => e
161
162
  tratar_excecao(e)
@@ -256,13 +257,18 @@ module Teodoro
256
257
  end
257
258
 
258
259
  def recibo
259
- @recibo ||= XML.new(xml_do_recibo)
260
+ XML.new(xml_do_recibo)
260
261
  end
261
262
 
262
263
  def xml_do_recibo
263
264
  Nokogiri::XML(xml.css('/eSocial/retornoProcessamentoDownload/recibo/*/*').to_s)
264
265
  end
265
266
 
267
+ def liberar_memoria
268
+ @xml = nil
269
+ @xml_do_evento = nil
270
+ end
271
+
266
272
  def tratar_excecao(excecao)
267
273
  puts caminho
268
274
  puts excecao.message
@@ -23,7 +23,8 @@ module Teodoro
23
23
  .select do |contrato|
24
24
  contrato.trabalhador.cpf == cpf_do_trabalhador &&
25
25
  contrato.categoria_do_trabalhador == categoria_do_trabalhador &&
26
- contrato.ativo?(data)
26
+ contrato.ativo?(data) &&
27
+ contrato.matricula_do_trabalhador.nil?
27
28
  end
28
29
  .max_by(&:data_de_inicio)
29
30
  end
@@ -1,3 +1,3 @@
1
1
  module Teodoro
2
- VERSION = '0.69.0'.freeze
2
+ VERSION = '0.69.2'.freeze
3
3
  end
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.69.0
4
+ version: 0.69.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fortes Tecnologia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-19 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri