odorico 1.1.0 → 1.2.0

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: 6eb989dd4bee699f5bfc6332a2b47bee0e55c7845f5276a5101b8b4ab7bad69f
4
- data.tar.gz: 3b763e069846309fc984381e21aeec10b33bbbcc1c9e3fbdc13cb7e1068df3bd
3
+ metadata.gz: 1f1ecabd2a5b80c0feec34dbc9ff7959216891969f3e9b2326727e3ef3d492f2
4
+ data.tar.gz: 94fff56483d3f79a92b2faec72d6253f1d592a96ad2ac00800c177213223a2f0
5
5
  SHA512:
6
- metadata.gz: eb822d65e60b183a268ac9d9be7175fef0a693157d1ea4dd61040f27bec523852a820658db9bd44ce9b7960e0b1218a63a820ff1fde758e077226cfaff67dc16
7
- data.tar.gz: 94c0c6f793fc353cf6c0efcfa92375aa295f07c6a3bd056908a51202bc6ff958b03d6b8b2fa22be231382a740bea97bd7b67af89fdbf434eb240c57fd66e16a1
6
+ metadata.gz: 9c4419890498b0c6c5601fe8dda26807823e73b37249c099736c1b3fcbd20a3a4286f2c76e29910221eefce6e8326de2e854cfbcceeaf7b9a235b99e0e18c7a7
7
+ data.tar.gz: e190480199ad09c5e2633c148368546158043d62f627d5ac5d6f3f00b2f56978536f630389a8dc586358d608919b6a18022ed388e58b4b5f1794542a85493b2c
@@ -29,8 +29,7 @@ class ArquivoAvisoPrevio
29
29
  ESX_MATRICULA
30
30
  ].freeze
31
31
 
32
- ATRIBUTOS_NAO_SUPORTADOS = {
33
- }.freeze
32
+ ATRIBUTOS_NAO_SUPORTADOS = {}.freeze
34
33
 
35
34
  ATRIBUTOS_DESCARTADOS = {
36
35
  Observação: %w[
@@ -59,8 +58,7 @@ class ArquivoAvisoPrevio
59
58
  end
60
59
 
61
60
  def regras_que_podem_gerar_alertas
62
- {
63
- }
61
+ {}
64
62
  end
65
63
 
66
64
  def identificador
@@ -45,13 +45,11 @@ class ArquivoCargo
45
45
  end
46
46
 
47
47
  def regras_que_podem_gerar_erros
48
- {
49
- }
48
+ {}
50
49
  end
51
50
 
52
51
  def regras_que_podem_gerar_alertas
53
- {
54
- }
52
+ {}
55
53
  end
56
54
 
57
55
  def identificador
@@ -82,8 +82,7 @@ class ArquivoEmpregadoAfastamentoInicio
82
82
  def ajustar_atributos; end
83
83
 
84
84
  def regras_que_podem_gerar_erros
85
- {
86
- }
85
+ {}
87
86
  end
88
87
 
89
88
  def regras_que_podem_gerar_alertas
@@ -88,8 +88,7 @@ class ArquivoEmpregadoAfastamentoTermino
88
88
  end
89
89
 
90
90
  def regras_que_podem_gerar_alertas
91
- {
92
- }
91
+ {}
93
92
  end
94
93
 
95
94
  def motivo_indefinido?
@@ -227,8 +227,7 @@ class ArquivoEmpregadoDesligamento
227
227
  end
228
228
 
229
229
  def regras_que_podem_gerar_alertas
230
- {
231
- }
230
+ {}
232
231
  end
233
232
 
234
233
  def identificador
@@ -174,8 +174,7 @@ class ArquivoEmpregadoHistoricoCadastral
174
174
  end
175
175
 
176
176
  def regras_que_podem_gerar_erros
177
- {
178
- }
177
+ {}
179
178
  end
180
179
 
181
180
  def regras_que_podem_gerar_alertas
@@ -128,8 +128,7 @@ class ArquivoEstabelecimento
128
128
  end
129
129
 
130
130
  def regras_que_podem_gerar_alertas
131
- {
132
- }
131
+ {}
133
132
  end
134
133
 
135
134
  def identificador
@@ -54,13 +54,11 @@ class ArquivoHorario
54
54
  end
55
55
 
56
56
  def regras_que_podem_gerar_erros
57
- {
58
- }
57
+ {}
59
58
  end
60
59
 
61
60
  def regras_que_podem_gerar_alertas
62
- {
63
- }
61
+ {}
64
62
  end
65
63
 
66
64
  def identificador
@@ -45,13 +45,11 @@ class ArquivoLotacao
45
45
  def ajustar_atributos; end
46
46
 
47
47
  def regras_que_podem_gerar_erros
48
- {
49
- }
48
+ {}
50
49
  end
51
50
 
52
51
  def regras_que_podem_gerar_alertas
53
- {
54
- }
52
+ {}
55
53
  end
56
54
 
57
55
  def identificador
@@ -274,8 +274,7 @@ class ArquivoTrabalhadorSemVinculo
274
274
  end
275
275
 
276
276
  def regras_que_podem_gerar_alertas
277
- {
278
- }
277
+ {}
279
278
  end
280
279
 
281
280
  def eh_estagiario_assalariado?
@@ -29,6 +29,7 @@ class ArquivoTrabalhadorSemVinculoHistoricoContratual
29
29
  EventoAdmissao_InformacoesInicio_CodigoCategoria_TEXT
30
30
  EventoAdmissao_InformacoesInicio_InformacoesComplementares_Remuneracao_UnidadeSalarioFixo_TEXT
31
31
  EventoAdmissao_InformacoesInicio_InformacoesComplementares_Remuneracao_DescricaoSalarioVariavel
32
+ InfoVinculo_InfoContrato_Remuneracao_DescricaoSalarioVariavel
32
33
  FiltroCargo
33
34
  CodigoCBO
34
35
  checkbox_preencher_grupo0
@@ -72,8 +73,7 @@ class ArquivoTrabalhadorSemVinculoHistoricoContratual
72
73
  end
73
74
 
74
75
  def regras_que_podem_gerar_alertas
75
- {
76
- }
76
+ {}
77
77
  end
78
78
 
79
79
  def data_de_alteracao_contratual_menor_ou_igual_a_data_de_admissao?
@@ -189,13 +189,11 @@ class ArquivoTrabalhadorSemVinculoTermino
189
189
  def ajustar_atributos; end
190
190
 
191
191
  def regras_que_podem_gerar_erros
192
- {
193
- }
192
+ {}
194
193
  end
195
194
 
196
195
  def regras_que_podem_gerar_alertas
197
- {
198
- }
196
+ {}
199
197
  end
200
198
 
201
199
  def identificador
@@ -180,10 +180,12 @@ class Processamento
180
180
  elsif nome_base_do_arquivo_data.include?('-TAF[') && !nome_base_do_arquivo_data.include?('TSV_')
181
181
  processar(ArquivoEmpregadoAfastamentoTermino.new(caminho_do_arquivo_data))
182
182
  elsif sufixo == 'GER'
183
- if nome_base_do_arquivo_data.include?('TSV_')
184
- processar(ArquivoTrabalhadorSemVinculoTermino.new(caminho_do_arquivo_data))
185
- else
186
- processar(ArquivoEmpregadoDesligamento.new(caminho_do_arquivo_data, grupo_da_empresa))
183
+ if data_de_desligamento?(caminho_do_arquivo_data)
184
+ processar_arquivo_de_termino_de_contrato_de_trabalho(
185
+ nome_base_do_arquivo_data: nome_base_do_arquivo_data,
186
+ caminho_do_arquivo_data: caminho_do_arquivo_data,
187
+ grupo_da_empresa: grupo_da_empresa
188
+ )
187
189
  end
188
190
  elsif sufixo == 'AVI'
189
191
  processar(ArquivoAvisoPrevio.new(caminho_do_arquivo_data))
@@ -213,6 +215,24 @@ class Processamento
213
215
  arquivo.atributos
214
216
  end
215
217
 
218
+ def data_de_desligamento?(caminho_do_arquivo_data)
219
+ File
220
+ .read(caminho_do_arquivo_data)
221
+ .match?(%r{^.*\r?\nESX_DATADESLIGAMENTO=\d{2}/\d{2}/\d{4}\r?\n.*$})
222
+ end
223
+
224
+ def processar_arquivo_de_termino_de_contrato_de_trabalho(
225
+ nome_base_do_arquivo_data:,
226
+ caminho_do_arquivo_data:,
227
+ grupo_da_empresa:
228
+ )
229
+ if nome_base_do_arquivo_data.include?('TSV_')
230
+ processar(ArquivoTrabalhadorSemVinculoTermino.new(caminho_do_arquivo_data))
231
+ else
232
+ processar(ArquivoEmpregadoDesligamento.new(caminho_do_arquivo_data, grupo_da_empresa))
233
+ end
234
+ end
235
+
216
236
  def ajustar_afastamentos_de_inicio
217
237
  afastamentos_de_inicio.each do |afastamento|
218
238
  afastamentos_no_inicio_da_fase_2
@@ -1,3 +1,3 @@
1
1
  module Odorico
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odorico
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fortes Tecnologia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-22 00:00:00.000000000 Z
11
+ date: 2023-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  requirements: []
180
- rubygems_version: 3.2.15
180
+ rubygems_version: 3.3.26
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: ''