teodoro 0.69.1 → 0.69.3

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: 90abefec5754574ab4c39762b2e8b280a214c179de2eea6a6aaa4a8d5bf087f2
4
- data.tar.gz: 9173afd727af5cedd0d557ec3e5b75e1a2e462958608173bd63d9b9feef16b99
3
+ metadata.gz: 37026ff5ff19302ea65aebd0db5dc248ed01a69a57dc23214bee3e74c67159aa
4
+ data.tar.gz: eb7d1214ad45d9e30535dac2cfa0929f77bf1708e07fa8b20969bae44d357755
5
5
  SHA512:
6
- metadata.gz: 577c0467184f14d9fe1c663a1d1ceaf90365331a09b0e1865a32a36dd7ef8fac3e1db44d3578ce7875c8ff409aeed1c29be6480d75838a4b93b1b0b752f9aefb
7
- data.tar.gz: 51417a0fb0b1ab61c20cb08f573651a355d4ab72c29505b02b9305fd0a547c4e521878fb3eb1f85422ac6798c452358765c4dbfc66a0b2024d6edc69bfeda876
6
+ metadata.gz: 0e6681d598cbf75e6a62911a48005fc0108b7d7e8c77092c22141465fa6afbc4e10f60e6915c7052a3d3aa8c89d83bd7b5c0511a34b37e38dcf388f7f2572c70
7
+ data.tar.gz: df7a9f6a4c7434c9e9d532611320eacdb24762cdb92ec179cb0fdcc04362ecc2b19cf754dd42cb5fc5d5be2042da905bf7076887623784442d4096457316caa2
@@ -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
data/lib/teodoro/obj.rb CHANGED
@@ -1,5 +1,8 @@
1
- module Obj
2
- def self.new(data)
3
- Struct.new(*data.keys).new(*data.values)
1
+ class Obj
2
+ def initialize(data)
3
+ @data = data
4
+ data.each_key do |attribute|
5
+ define_singleton_method(attribute) { @data[attribute] }
6
+ end
4
7
  end
5
8
  end
@@ -1,3 +1,3 @@
1
1
  module Teodoro
2
- VERSION = '0.69.1'.freeze
2
+ VERSION = '0.69.3'.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.1
4
+ version: 0.69.3
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-21 00:00:00.000000000 Z
11
+ date: 2024-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri