brcobranca 6.1.3 → 6.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +2 -0
- data/lib/brcobranca/remessa/cnab240/base.rb +1 -3
- data/lib/brcobranca/remessa/cnab400/base.rb +1 -3
- data/lib/brcobranca/version.rb +1 -1
- data/spec/fixtures/remessa/remessa-banco_brasil-cnab240.rem +6 -6
- data/spec/fixtures/remessa/remessa-bancoob-cnab240.rem +6 -6
- data/spec/fixtures/remessa/remessa-bradesco-cnab400.rem +3 -3
- data/spec/fixtures/remessa/remessa-caixa-cnab240.rem +6 -6
- data/spec/fixtures/remessa/remessa-citibank-cnab400.rem +3 -3
- data/spec/fixtures/remessa/remessa-itau-cnab400.rem +3 -3
- data/spec/fixtures/remessa/remessa-santander-cnab400.rem +3 -3
- data/spec/support/remessa_helpers.rb +1 -2
- data/spec/support/shared_examples/cnab240.rb +1 -2
- data/spec/support/shared_examples/cnab400.rb +2 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64ebf54fd6ee9fbbea381245154cf6ed354bc288
|
4
|
+
data.tar.gz: 6f7a089115e1d3ecc375c2e91a16d057b7867762
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abf2973f703c60a283661823b91f82fba57a1650d1d5ae764a2c7a116c8dd316decd3636749c1411b0910f401e22dc32b3cab0f5dfb4cfb08d0b55dc74d6744c
|
7
|
+
data.tar.gz: 76d180cded9c18b2d579b803e4c6e4d5a3a39969db7d500871a891802c6a7bc0360ad565fa3f5da9b4330a7a8ae73fb32ab0f281d685c97cd1f8691aa6f2f3fb
|
data/.gitattributes
ADDED
@@ -304,9 +304,7 @@ module Brcobranca
|
|
304
304
|
|
305
305
|
arquivo << monta_trailer_arquivo(contador, ((pagamentos.size * 2) + (contador * 2) + 2))
|
306
306
|
|
307
|
-
arquivo
|
308
|
-
arquivo << "\r\n"
|
309
|
-
arquivo
|
307
|
+
arquivo.join("\r\n").to_ascii.upcase
|
310
308
|
end
|
311
309
|
|
312
310
|
# Complemento do registro
|
@@ -71,9 +71,7 @@ module Brcobranca
|
|
71
71
|
ret << monta_detalhe(pagamento, contador)
|
72
72
|
end
|
73
73
|
ret << monta_trailer(contador + 1)
|
74
|
-
ret
|
75
|
-
ret << "\r\n"
|
76
|
-
ret
|
74
|
+
ret.join("\r\n").to_ascii.upcase
|
77
75
|
end
|
78
76
|
|
79
77
|
# Informacoes referentes a conta do cedente
|
data/lib/brcobranca/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
00100000 100012345678901001234567001412123 0123430000000123455 SOCIEDADE BRASILEIRA DE ZOOLOGBANCO DO BRASIL S.A. 114072015161515000000083000000000000000000000000000000000000000000000
|
2
|
-
00100011R01 042 1000012345678901001234567001412123 0123430000000123455 SOCIEDADE BRASILEIRA DE ZOOLOG 000000001407201500000000
|
3
|
-
0010001300001P 010123430000000123455 12345670000000123 71 000000000000000001407201500000000001999000000 02N14072015000000000000000000000000000000000000000000000000000000000000000000000000000000 3000000090000000000
|
4
|
-
0010001300002Q 011000012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS QU12345678SANTA RITA DE CSP0000000000000000 000
|
5
|
-
00100015 0000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
6
|
-
00199999 000001000006
|
1
|
+
00100000 100012345678901001234567001412123 0123430000000123455 SOCIEDADE BRASILEIRA DE ZOOLOGBANCO DO BRASIL S.A. 114072015161515000000083000000000000000000000000000000000000000000000
|
2
|
+
00100011R01 042 1000012345678901001234567001412123 0123430000000123455 SOCIEDADE BRASILEIRA DE ZOOLOG 000000001407201500000000
|
3
|
+
0010001300001P 010123430000000123455 12345670000000123 71 000000000000000001407201500000000001999000000 02N14072015000000000000000000000000000000000000000000000000000000000000000000000000000000 3000000090000000000
|
4
|
+
0010001300002Q 011000012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS QU12345678SANTA RITA DE CSP0000000000000000 000
|
5
|
+
00100015 0000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
6
|
+
00199999 000001000006
|
@@ -1,6 +1,6 @@
|
|
1
|
-
75600000 274576177000177 0432730000000036668 SOCIEDADE BRASILEIRA DE ZOOLOGSICOOB 114072015161515000000081000000000000000000000000000000000000000000000
|
2
|
-
75600011R01 040 2074576177000177 0432730000000036668 SOCIEDADE BRASILEIRA DE ZOOLOG 000000001407201500000000
|
3
|
-
7560001300001P 010432730000000036668 000042971501014 10 220000000000000001407201500000000000500000000002N14072015000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000090000000000
|
4
|
-
7560001300002Q 011000082136760505PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS QU12345678SANTA RITA DE CRJ0000000000000000 000
|
5
|
-
75600015 000004
|
6
|
-
75699999 000001000006
|
1
|
+
75600000 274576177000177 0432730000000036668 SOCIEDADE BRASILEIRA DE ZOOLOGSICOOB 114072015161515000000081000000000000000000000000000000000000000000000
|
2
|
+
75600011R01 040 2074576177000177 0432730000000036668 SOCIEDADE BRASILEIRA DE ZOOLOG 000000001407201500000000
|
3
|
+
7560001300001P 010432730000000036668 000042971501014 10 220000000000000001407201500000000000500000000002N14072015000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000090000000000
|
4
|
+
7560001300002Q 011000082136760505PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS QU12345678SANTA RITA DE CRJ0000000000000000 000
|
5
|
+
75600015 000004
|
6
|
+
75699999 000001000006
|
@@ -1,3 +1,3 @@
|
|
1
|
-
01REMESSA01COBRANCA 00000000000000000123SOCIEDADE BRASILEIRA DE ZOOLOG237BRADESCO 140715 MX0000001 000001
|
2
|
-
1000000000000000000000011234512345671 0000000000000000123P00000000002N 2 01 14071500000000199900000000099N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SU SANTA RITA DE C/SP 12345678 000002
|
3
|
-
9 000003
|
1
|
+
01REMESSA01COBRANCA 00000000000000000123SOCIEDADE BRASILEIRA DE ZOOLOG237BRADESCO 140715 MX0000001 000001
|
2
|
+
1000000000000000000000011234512345671 0000000000000000123P00000000002N 2 01 14071500000000199900000000099N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SU SANTA RITA DE C/SP 12345678 000002
|
3
|
+
9 000003
|
@@ -1,6 +1,6 @@
|
|
1
|
-
10400000 1000123456789010000000000000000000012345112345600000000SOCIEDADE BRASILEIRA DE ZOOLOGCAIXA ECONOMICA FEDERAL 1140720151615150000000500000000000000000000000000000000000000000000001234
|
2
|
-
10400011R01 030 1000012345678901123456 12345112345600000000SOCIEDADE BRASILEIRA DE ZOOLOG 000000001407201500000000
|
3
|
-
1040001300001P 01123451123456000000000001400000000000012311 200000000000000001407201500000000001999000000099N14072015000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000090000000000
|
4
|
-
1040001300002Q 011000012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS QU12345678SANTA RITA DE CSP0000000000000000 000
|
5
|
-
10400015 000004000000000000000000000000000000000000000000000000000000000000000000000
|
6
|
-
10499999 000001000006
|
1
|
+
10400000 1000123456789010000000000000000000012345112345600000000SOCIEDADE BRASILEIRA DE ZOOLOGCAIXA ECONOMICA FEDERAL 1140720151615150000000500000000000000000000000000000000000000000000001234
|
2
|
+
10400011R01 030 1000012345678901123456 12345112345600000000SOCIEDADE BRASILEIRA DE ZOOLOG 000000001407201500000000
|
3
|
+
1040001300001P 01123451123456000000000001400000000000012311 200000000000000001407201500000000001999000000099N14072015000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000090000000000
|
4
|
+
1040001300002Q 011000012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS QU12345678SANTA RITA DE CSP0000000000000000 000
|
5
|
+
10400015 000004000000000000000000000000000000000000000000000000000000000000000000000
|
6
|
+
10499999 000001000006
|
@@ -1,3 +1,3 @@
|
|
1
|
-
01REMESSA01COBRANCA 17777751042700080112SOCIEDADE BRASILEIRA DE ZOOLOG745CITIBANK 140715 01600BPI000001
|
2
|
-
1010001234567891017777751042700080112 01000000000123 0000000000000000000000000101000000000014071500000000199907450000007N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS12345678SANTA RITA DE CSP 9000002
|
3
|
-
9 000003
|
1
|
+
01REMESSA01COBRANCA 17777751042700080112SOCIEDADE BRASILEIRA DE ZOOLOG745CITIBANK 140715 01600BPI000001
|
2
|
+
1010001234567891017777751042700080112 01000000000123 0000000000000000000000000101000000000014071500000000199907450000007N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS12345678SANTA RITA DE CSP 9000002
|
3
|
+
9 000003
|
@@ -1,3 +1,3 @@
|
|
1
|
-
01REMESSA01COBRANCA 123400123451 SOCIEDADE BRASILEIRA DE ZOOLOG341BANCO ITAU SA 140715 000001
|
2
|
-
10100012345678910123400123451 0000 000001230000000000000123 I01000000000014071500000000199903410000099N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE RUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS12345678SANTA RITA DE CSP 00000003 000002
|
3
|
-
9 000003
|
1
|
+
01REMESSA01COBRANCA 123400123451 SOCIEDADE BRASILEIRA DE ZOOLOG341BANCO ITAU SA 140715 000001
|
2
|
+
10100012345678910123400123451 0000 000001230000000000000123 I01000000000014071500000000199903410000099N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE RUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS12345678SANTA RITA DE CSP 00000003 000002
|
3
|
+
9 000003
|
@@ -1,3 +1,3 @@
|
|
1
|
-
01REMESSA01COBRANCA 17777751042700080112SOCIEDADE BRASILEIRA DE ZOOLOG033SANTANDER 140715 58000001
|
2
|
-
1010001234567891017777751042700080112 00000123000000 00000000000000000000 000000101000000000014071500000000199900330000001N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS12345678SANTA RITA DE CSP 00 000002
|
3
|
-
9 000003
|
1
|
+
01REMESSA01COBRANCA 17777751042700080112SOCIEDADE BRASILEIRA DE ZOOLOG033SANTANDER 140715 58000001
|
2
|
+
1010001234567891017777751042700080112 00000123000000 00000000000000000000 000000101000000000014071500000000199900330000001N140715000000000000000000000000000000000000000000000000000000000000000100012345678901PABLO DIEGO JOSE FRANCISCO DE PAULA JUANRUA RIO GRANDE DO SUL SAO PAULO MINAS CASAO JOSE DOS12345678SANTA RITA DE CSP 00 000002
|
3
|
+
9 000003
|
@@ -1,8 +1,7 @@
|
|
1
1
|
module RemessaHelpers
|
2
2
|
def read_remessa(name, body=nil)
|
3
3
|
filename = File.join(File.dirname(__FILE__), '..', 'fixtures', 'remessa', name)
|
4
|
-
|
5
|
-
File.open(filename, 'w') { |f| f.write(@body) } unless File.exist?(filename)
|
4
|
+
File.open(filename, 'w') { |f| f.write(body) } unless File.exist?(filename)
|
6
5
|
File.read(filename)
|
7
6
|
end
|
8
7
|
end
|
@@ -182,14 +182,13 @@ shared_examples_for 'cnab240' do
|
|
182
182
|
it 'remessa deve conter os registros mais as quebras de linha' do
|
183
183
|
remessa = objeto.gera_arquivo
|
184
184
|
|
185
|
-
expect(remessa.size).to eq
|
185
|
+
expect(remessa.size).to eq 1450
|
186
186
|
# quebras de linha
|
187
187
|
expect(remessa[240..241]).to eq "\r\n"
|
188
188
|
expect(remessa[482..483]).to eq "\r\n"
|
189
189
|
expect(remessa[724..725]).to eq "\r\n"
|
190
190
|
expect(remessa[966..967]).to eq "\r\n"
|
191
191
|
expect(remessa[1208..1209]).to eq "\r\n"
|
192
|
-
expect(remessa[1450..1451]).to eq "\r\n"
|
193
192
|
end
|
194
193
|
end
|
195
194
|
end
|
@@ -81,7 +81,7 @@ shared_examples_for 'cnab400' do
|
|
81
81
|
|
82
82
|
it 'remessa deve conter os registros mais as quebras de linha' do
|
83
83
|
remessa = objeto.gera_arquivo
|
84
|
-
expect(remessa.size).to eq
|
84
|
+
expect(remessa.size).to eq 1204
|
85
85
|
|
86
86
|
# registros
|
87
87
|
expect(remessa[0..399]).to eq objeto.monta_header
|
@@ -90,13 +90,12 @@ shared_examples_for 'cnab400' do
|
|
90
90
|
# quebras de linha
|
91
91
|
expect(remessa[400..401]).to eq "\r\n"
|
92
92
|
expect(remessa[802..803]).to eq "\r\n"
|
93
|
-
expect(remessa[1204..1205]).to eq "\r\n"
|
94
93
|
end
|
95
94
|
|
96
95
|
it 'deve ser possivel adicionar mais de um pagamento' do
|
97
96
|
objeto.pagamentos << pagamento
|
98
97
|
remessa = objeto.gera_arquivo
|
99
98
|
|
100
|
-
expect(remessa.size).to eq
|
99
|
+
expect(remessa.size).to eq 1606
|
101
100
|
end
|
102
101
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brcobranca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kivanio Barbosa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rghost
|
@@ -87,6 +87,7 @@ extensions: []
|
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
89
|
- ".coveralls.yml"
|
90
|
+
- ".gitattributes"
|
90
91
|
- ".gitignore"
|
91
92
|
- ".rspec"
|
92
93
|
- ".rubocop.yml"
|