formatos-febraban 0.2.13 → 0.2.14

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
  SHA1:
3
- metadata.gz: 77b220d2ec011b2e7cb53cb7bf17004c0d18260a
4
- data.tar.gz: 19d9b348d532775bd2a55325b217293b62a8eebf
3
+ metadata.gz: 6e45be64b0a7496a7495c4239878886665dc3abc
4
+ data.tar.gz: 3be499957a5430da2570b5df524c6f9e0ced1759
5
5
  SHA512:
6
- metadata.gz: 26c2079def0a9c4804ffe41ecb8956200a613e664ca8af859d1207667decef2cca9849ff6c4673d08b3d093846892cd2ea177acebbff08ac56860c78f31ad18e
7
- data.tar.gz: 2ab7581d1cf73107b471604311a81d8e11a9b53438ca02c06f8728959f6ec652d52626219c2ae3ddee590b214bd9886296d0cdf8ab78db729d242b57aa6137b3
6
+ metadata.gz: cd8ba1ff4851666ec717f773a13804110fbc8b1d613789c9198815d04bc22db96c5f11d3a96db008b1628ccffb144eee6f7e336c2e4520dcd6411b08521d2d17
7
+ data.tar.gz: ba8a9b19b958eb46debba466bc90223b1dac54c6a9042951049ab11423908e0a779c8d5cb74c2506bb880abb6d5640e3752336e3f8ce386a4011b2c386d2aece
@@ -1,5 +1,5 @@
1
1
  module Formatos
2
2
  module Febraban
3
- VERSION = "0.2.13"
3
+ VERSION = "0.2.14"
4
4
  end
5
5
  end
@@ -435,11 +435,16 @@ class Febraban150
435
435
  raise "Layout atual inválido!" unless self.is_valid?
436
436
 
437
437
  if generate_name
438
- path += "/" if not path.end_with?("/")
438
+ path += "/" unless path.end_with?("/")
439
+ header = self.get_header
440
+ codigo_remessa = header.get_codigo_remessa
441
+
439
442
  path += "#{header.get_data_geracao}_#{codigo_remessa}_#{header.get_codigo_banco}_#{self.versao_layout}.bat"
440
443
  end
441
444
 
442
- File.write(path, self.to_s)
445
+ File.open(path, 'w') { |f|
446
+ f.puts self.to_s
447
+ }
443
448
  end
444
449
 
445
450
  protected
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatos-febraban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - josé Ricardo Almeida