teodoro 0.40.1 → 0.40.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 648f853591aa7964b70f197de4a64a4d8947502de0e1fd1a9cf56c3b973c812e
4
- data.tar.gz: 363fabc74c2524c3a66eeab8a89b19e8447712f3efb599ae715c5a9ea3a0b943
3
+ metadata.gz: efa860014fc3400f46dd178668f23c99a5038da1365d0ac01ffb79b84289b4d1
4
+ data.tar.gz: c3611aeedb378f6b51c4e5f190c10d7c861278a3491ea4cab5e4c6c57ab94d73
5
5
  SHA512:
6
- metadata.gz: 1368d1f9836ea1bf4cdc12be49cc988d999cf877e496f72c502b4134e883e990d29a6d3486af209fd739cbdc4f780a89858b4635fc5e79b0a21617202d985750
7
- data.tar.gz: 46366c1e9684fc093df1d8201c57eb70fac11282b6fabf598bc91885a5007bbbf33e0468556e9118bc562d08daaa7139c66f2f43fedb661d81b74b8f96260c43
6
+ metadata.gz: 15cc83830666bff67c99e9ffc428d894f9552f5df6936091d10e2d3af5d5bb68fff4b61239ae75cb06a532c6d8248af3860bdc12cd7f2ce6b6da3cd00bcd156d
7
+ data.tar.gz: c53d0a46636325d37ba379f42c356f49f680fea8325ff5fb5a19cbfca3e9d641eb6796733b2a646dac18e6870aa457bd8d0b0f72613b7a6a1d94ec42ddc4738b
data/lib/teodoro.rb CHANGED
@@ -12,7 +12,7 @@ require_relative 'teodoro/empresa'
12
12
  require_relative 'teodoro/obj'
13
13
 
14
14
  module Teodoro
15
- VERSION = '0.40.1'.freeze
15
+ VERSION = '0.40.2'.freeze
16
16
 
17
17
  CBOs = __FILE__
18
18
  .then { File.dirname(_1) }
@@ -18,7 +18,7 @@ module Teodoro
18
18
  attr_reader :nome
19
19
 
20
20
  def criar
21
- raise caminho if File.exist?(caminho)
21
+ raise 'evento duplicado' if File.exist?(caminho)
22
22
 
23
23
  File.open(caminho, 'w') do
24
24
  _1.puts(conteudo_do_arquivo)
@@ -103,6 +103,10 @@ module Teodoro
103
103
  validar_versao_do_leiaute
104
104
  processar_arquivo
105
105
  end
106
+ rescue StandardError => e
107
+ puts caminho
108
+ puts e.message
109
+ raise e
106
110
  end
107
111
 
108
112
  private
@@ -43,7 +43,11 @@ module Teodoro
43
43
  if inicio_do_afastamento?
44
44
  inicio_do_afastamento['dtIniAfast']
45
45
  else
46
- contrato_de_trabalho.afastamento.data_de_inicio
46
+ contrato_de_trabalho.afastamento.then do
47
+ raise 'término de afastamento sem início de afastamento' unless _1
48
+
49
+ _1.data_de_inicio
50
+ end
47
51
  end
48
52
  end
49
53
 
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.40.1
4
+ version: 0.40.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clavius Tales
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
11
+ date: 2021-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri