brcobranca 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +1 -1
- data/Rakefile +5 -5
- data/brcobranca.gemspec +13 -13
- data/lib/brcobranca/retorno/base.rb +43 -0
- data/lib/brcobranca/retorno/retorno_cbr643.rb +41 -81
- data/lib/brcobranca.rb +2 -2
- data/test/arquivos/CBR64310.RET +28 -51
- data/test/test_retorno_cbr643.rb +57 -8
- data/website/index.html +1 -1
- metadata +7 -7
- data/config/website.yml +0 -2
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -3,7 +3,6 @@ Manifest.txt
|
|
3
3
|
README.rdoc
|
4
4
|
Rakefile
|
5
5
|
brcobranca.gemspec
|
6
|
-
config/website.yml
|
7
6
|
lib/brcobranca.rb
|
8
7
|
lib/brcobranca/arquivos/logos/bb.jpg
|
9
8
|
lib/brcobranca/arquivos/logos/bradesco.jpg
|
@@ -24,6 +23,7 @@ lib/brcobranca/boleto/template/util.rb
|
|
24
23
|
lib/brcobranca/config.rb
|
25
24
|
lib/brcobranca/core_ext.rb
|
26
25
|
lib/brcobranca/currency.rb
|
26
|
+
lib/brcobranca/retorno/base.rb
|
27
27
|
lib/brcobranca/retorno/retorno_cbr643.rb
|
28
28
|
script/console
|
29
29
|
script/destroy
|
data/Rakefile
CHANGED
@@ -8,17 +8,17 @@ $hoe = Hoe.new('brcobranca', Brcobranca::VERSION) do |p|
|
|
8
8
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
9
|
p.rubyforge_name = p.name # TODO this is default value
|
10
10
|
p.extra_deps = [
|
11
|
-
['rghost','>= 0.8.
|
11
|
+
['rghost','>= 0.8.6'],
|
12
12
|
['rghost_barcode','>= 0.8'],
|
13
|
-
['parseline','>= 1.0.
|
13
|
+
['parseline','>= 1.0.3']
|
14
14
|
]
|
15
15
|
p.extra_dev_deps = [
|
16
16
|
['newgem', ">= #{::Newgem::VERSION}"]
|
17
17
|
]
|
18
|
-
|
18
|
+
|
19
19
|
p.rdoc_pattern = /rb$|rdoc$/
|
20
|
-
p.summary = 'Gem
|
21
|
-
p.description =
|
20
|
+
p.summary = 'Gem que permite trabalhar com cobranças via bancos brasileiros.'
|
21
|
+
p.description = 'Gem para emissão de bloquetos de cobrança de bancos brasileiros.'
|
22
22
|
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
23
23
|
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
24
24
|
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
data/brcobranca.gemspec
CHANGED
@@ -2,22 +2,22 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{brcobranca}
|
5
|
-
s.version = "2.0.
|
5
|
+
s.version = "2.0.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Kivanio Barbosa"]
|
9
|
-
s.date = %q{2009-04
|
9
|
+
s.date = %q{2009-05-04}
|
10
10
|
s.description = %q{Gem para emissão de bloquetos de cobrança de bancos brasileiros.}
|
11
11
|
s.email = ["kivanio@gmail.com"]
|
12
12
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc", "website/index.txt"]
|
13
|
-
s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "brcobranca.gemspec", "
|
13
|
+
s.files = ["History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "brcobranca.gemspec", "lib/brcobranca.rb", "lib/brcobranca/arquivos/logos/bb.jpg", "lib/brcobranca/arquivos/logos/bradesco.jpg", "lib/brcobranca/arquivos/logos/hsbc.jpg", "lib/brcobranca/arquivos/logos/itau.jpg", "lib/brcobranca/arquivos/logos/real.jpg", "lib/brcobranca/arquivos/logos/unibanco.jpg", "lib/brcobranca/arquivos/templates/modelo_generico.eps", "lib/brcobranca/boleto/banco_bradesco.rb", "lib/brcobranca/boleto/banco_brasil.rb", "lib/brcobranca/boleto/banco_hsbc.rb", "lib/brcobranca/boleto/banco_itau.rb", "lib/brcobranca/boleto/banco_real.rb", "lib/brcobranca/boleto/banco_unibanco.rb", "lib/brcobranca/boleto/base.rb", "lib/brcobranca/boleto/template/rghost.rb", "lib/brcobranca/boleto/template/util.rb", "lib/brcobranca/config.rb", "lib/brcobranca/core_ext.rb", "lib/brcobranca/currency.rb", "lib/brcobranca/retorno/base.rb", "lib/brcobranca/retorno/retorno_cbr643.rb", "script/console", "script/destroy", "script/generate", "script/txt2html", "test/arquivos/CBR64310.RET", "test/test_banco_bradesco.rb", "test/test_banco_brasil.rb", "test/test_banco_hsbc.rb", "test/test_banco_itau.rb", "test/test_banco_real.rb", "test/test_banco_unibanco.rb", "test/test_base.rb", "test/test_core_ext.rb", "test/test_currency.rb", "test/test_helper.rb", "test/test_retorno_cbr643.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb"]
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://brcobranca.rubyforge.org}
|
16
16
|
s.rdoc_options = ["--main", "README.rdoc"]
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.rubyforge_project = %q{brcobranca}
|
19
19
|
s.rubygems_version = %q{1.3.2}
|
20
|
-
s.summary = %q{Gem
|
20
|
+
s.summary = %q{Gem que permite trabalhar com cobranças via bancos brasileiros.}
|
21
21
|
s.test_files = ["test/test_banco_bradesco.rb", "test/test_banco_brasil.rb", "test/test_banco_hsbc.rb", "test/test_banco_itau.rb", "test/test_banco_real.rb", "test/test_banco_unibanco.rb", "test/test_base.rb", "test/test_core_ext.rb", "test/test_currency.rb", "test/test_helper.rb", "test/test_retorno_cbr643.rb"]
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
@@ -25,23 +25,23 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.specification_version = 3
|
26
26
|
|
27
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
|
-
s.add_runtime_dependency(%q<rghost>, [">= 0.8.
|
28
|
+
s.add_runtime_dependency(%q<rghost>, [">= 0.8.6"])
|
29
29
|
s.add_runtime_dependency(%q<rghost_barcode>, [">= 0.8"])
|
30
|
-
s.add_runtime_dependency(%q<parseline>, [">= 1.0.
|
31
|
-
s.add_development_dependency(%q<newgem>, [">= 1.
|
30
|
+
s.add_runtime_dependency(%q<parseline>, [">= 1.0.3"])
|
31
|
+
s.add_development_dependency(%q<newgem>, [">= 1.4.1"])
|
32
32
|
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
33
33
|
else
|
34
|
-
s.add_dependency(%q<rghost>, [">= 0.8.
|
34
|
+
s.add_dependency(%q<rghost>, [">= 0.8.6"])
|
35
35
|
s.add_dependency(%q<rghost_barcode>, [">= 0.8"])
|
36
|
-
s.add_dependency(%q<parseline>, [">= 1.0.
|
37
|
-
s.add_dependency(%q<newgem>, [">= 1.
|
36
|
+
s.add_dependency(%q<parseline>, [">= 1.0.3"])
|
37
|
+
s.add_dependency(%q<newgem>, [">= 1.4.1"])
|
38
38
|
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
39
39
|
end
|
40
40
|
else
|
41
|
-
s.add_dependency(%q<rghost>, [">= 0.8.
|
41
|
+
s.add_dependency(%q<rghost>, [">= 0.8.6"])
|
42
42
|
s.add_dependency(%q<rghost_barcode>, [">= 0.8"])
|
43
|
-
s.add_dependency(%q<parseline>, [">= 1.0.
|
44
|
-
s.add_dependency(%q<newgem>, [">= 1.
|
43
|
+
s.add_dependency(%q<parseline>, [">= 1.0.3"])
|
44
|
+
s.add_dependency(%q<newgem>, [">= 1.4.1"])
|
45
45
|
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
46
46
|
end
|
47
47
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Brcobranca
|
2
|
+
module Retorno
|
3
|
+
class Base
|
4
|
+
# Agência com DV, posições 17 à 21
|
5
|
+
attr_accessor :agencia_com_dv
|
6
|
+
attr_accessor :cedente_com_dv
|
7
|
+
attr_accessor :convenio
|
8
|
+
attr_accessor :nosso_numero
|
9
|
+
attr_accessor :tipo_cobranca
|
10
|
+
attr_accessor :tipo_cobranca_anterior
|
11
|
+
attr_accessor :natureza_recebimento
|
12
|
+
attr_accessor :carteira_variacao
|
13
|
+
attr_accessor :desconto
|
14
|
+
attr_accessor :iof
|
15
|
+
attr_accessor :carteira
|
16
|
+
attr_accessor :comando
|
17
|
+
attr_accessor :data_liquidacao
|
18
|
+
attr_accessor :data_vencimento
|
19
|
+
attr_accessor :valor_titulo
|
20
|
+
attr_accessor :banco_recebedor
|
21
|
+
attr_accessor :agencia_recebedora_com_dv
|
22
|
+
attr_accessor :especie_documento
|
23
|
+
attr_accessor :data_credito
|
24
|
+
attr_accessor :valor_tarifa
|
25
|
+
attr_accessor :outras_despesas
|
26
|
+
attr_accessor :juros_desconto
|
27
|
+
attr_accessor :iof_desconto
|
28
|
+
attr_accessor :valor_abatimento
|
29
|
+
attr_accessor :desconto_concedito
|
30
|
+
attr_accessor :valor_recebido
|
31
|
+
attr_accessor :juros_mora
|
32
|
+
attr_accessor :outros_recebimento
|
33
|
+
attr_accessor :abatimento_nao_aproveitado
|
34
|
+
attr_accessor :valor_lancamento
|
35
|
+
attr_accessor :indicativo_lancamento
|
36
|
+
attr_accessor :indicador_valor
|
37
|
+
attr_accessor :valor_ajuste
|
38
|
+
attr_accessor :sequencial
|
39
|
+
attr_accessor :arquivo
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
@@ -1,84 +1,44 @@
|
|
1
1
|
require 'parseline'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
attr_accessor :sequencial
|
44
|
-
|
45
|
-
fixed_width_layout do |parse|
|
46
|
-
parse.field :agencia_com_dv,17..21
|
47
|
-
parse.field :cedente_com_dv,22..30
|
48
|
-
parse.field :convenio,31..37
|
49
|
-
parse.field :nosso_numero,63..79
|
50
|
-
parse.field :tipo_cobranca,80..80
|
51
|
-
parse.field :tipo_cobranca_anterior,81..81
|
52
|
-
parse.field :natureza_recebimento,86..87
|
53
|
-
parse.field :carteira_variacao,91..93
|
54
|
-
parse.field :desconto,95..99
|
55
|
-
parse.field :iof,100..104
|
56
|
-
parse.field :carteira,106..107
|
57
|
-
parse.field :comando,108..109
|
58
|
-
parse.field :data_liquidacao,110..115
|
59
|
-
parse.field :data_vencimento,146..151
|
60
|
-
parse.field :valor_titulo,152..164
|
61
|
-
parse.field :banco_recebedor,165..167
|
62
|
-
parse.field :agencia_recebedora_com_dv,168..172
|
63
|
-
parse.field :especie_documento,173..174
|
64
|
-
parse.field :data_credito,175..180
|
65
|
-
parse.field :valor_tarifa,181..187
|
66
|
-
parse.field :outras_despesas,188..200
|
67
|
-
parse.field :juros_desconto,201..213
|
68
|
-
parse.field :iof_desconto,214..226
|
69
|
-
parse.field :valor_abatimento,227..239
|
70
|
-
parse.field :desconto_concedito,240..252
|
71
|
-
parse.field :valor_recebido,253..265
|
72
|
-
parse.field :juros_mora,266..278
|
73
|
-
parse.field :outros_recebimento,279..291
|
74
|
-
parse.field :abatimento_nao_aproveitado,292..304
|
75
|
-
parse.field :valor_lancamento,305..317
|
76
|
-
parse.field :indicativo_lancamento,318..318
|
77
|
-
parse.field :indicador_valor,319..319
|
78
|
-
parse.field :valor_ajuste,320..331
|
79
|
-
parse.field :sequencial,394..399
|
80
|
-
end
|
81
|
-
end
|
3
|
+
# Formato de Retorno CNAB 643
|
4
|
+
class RetornoCbr643 < Brcobranca::Retorno::Base
|
5
|
+
# Extendendo parseline
|
6
|
+
extend ParseLine::FixedWidth
|
7
|
+
|
8
|
+
fixed_width_layout do |parse|
|
9
|
+
parse.field :agencia_com_dv,17..21
|
10
|
+
parse.field :cedente_com_dv,22..30
|
11
|
+
parse.field :convenio,31..37
|
12
|
+
parse.field :nosso_numero,63..79
|
13
|
+
parse.field :tipo_cobranca,80..80
|
14
|
+
parse.field :tipo_cobranca_anterior,81..81
|
15
|
+
parse.field :natureza_recebimento,86..87
|
16
|
+
parse.field :carteira_variacao,91..93
|
17
|
+
parse.field :desconto,95..99
|
18
|
+
parse.field :iof,100..104
|
19
|
+
parse.field :carteira,106..107
|
20
|
+
parse.field :comando,108..109
|
21
|
+
parse.field :data_liquidacao,110..115
|
22
|
+
parse.field :data_vencimento,146..151
|
23
|
+
parse.field :valor_titulo,152..164
|
24
|
+
parse.field :banco_recebedor,165..167
|
25
|
+
parse.field :agencia_recebedora_com_dv,168..172
|
26
|
+
parse.field :especie_documento,173..174
|
27
|
+
parse.field :data_credito,175..180
|
28
|
+
parse.field :valor_tarifa,181..187
|
29
|
+
parse.field :outras_despesas,188..200
|
30
|
+
parse.field :juros_desconto,201..213
|
31
|
+
parse.field :iof_desconto,214..226
|
32
|
+
parse.field :valor_abatimento,227..239
|
33
|
+
parse.field :desconto_concedito,240..252
|
34
|
+
parse.field :valor_recebido,253..265
|
35
|
+
parse.field :juros_mora,266..278
|
36
|
+
parse.field :outros_recebimento,279..291
|
37
|
+
parse.field :abatimento_nao_aproveitado,292..304
|
38
|
+
parse.field :valor_lancamento,305..317
|
39
|
+
parse.field :indicativo_lancamento,318..318
|
40
|
+
parse.field :indicador_valor,319..319
|
41
|
+
parse.field :valor_ajuste,320..331
|
42
|
+
parse.field :sequencial,394..399
|
82
43
|
end
|
83
|
-
end
|
84
|
-
|
44
|
+
end
|
data/lib/brcobranca.rb
CHANGED
@@ -6,7 +6,7 @@ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
|
|
6
6
|
|
7
7
|
%w(util rghost).each {|req| require File.join(File.dirname(__FILE__),"brcobranca","boleto","template",req) }
|
8
8
|
|
9
|
-
%w(retorno_cbr643).each {|req| require File.join(File.dirname(__FILE__),"brcobranca","retorno",req) }
|
9
|
+
%w(base retorno_cbr643).each {|req| require File.join(File.dirname(__FILE__),"brcobranca","retorno",req) }
|
10
10
|
|
11
11
|
case Brcobranca::Config::OPCOES[:gerador]
|
12
12
|
when 'rghost'
|
@@ -23,5 +23,5 @@ else
|
|
23
23
|
end
|
24
24
|
|
25
25
|
module Brcobranca
|
26
|
-
VERSION = '2.0.
|
26
|
+
VERSION = '2.0.4'
|
27
27
|
end
|
data/test/arquivos/CBR64310.RET
CHANGED
@@ -1,51 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
70000000000000000335210001414731123725 1123725000004760910000001 01900000000000 1806080708 000000000000010351200105517001007080000175000000000000000000000000000000000000000000000000000000000000000000000000103512000000000000000000000000000000000000000000000010333720000000000000 0000000000000000000000000000000000000000000000000008000030
|
30
|
-
70000000000000000335210001414731123725 1123725000004761010000001 01900000000000 1806080708 000000000000011946500130376001007080000175000000000000000000000000000000000000000000000000000000000000000000000000119465000000000000000000000000000000000000000000000011929020000000000000 0000000000000000000000000000000000000000000000000004000031
|
31
|
-
70000000000000000335210001414731123725 1123725000004761110000001 01900000000000 1806080708 000000000000012273800130376001007080000175000000000000000000000000000000000000000000000000000000000000000000000000122738000000000000000000000000000000000000000000000012256320000000000000 0000000000000000000000000000000000000000000000000004000032
|
32
|
-
70000000000000000335210001414731123725 1123725000004761210000001 01900000000000 1806080708 000000000000012349600130376001007080000175000000000000000000000000000000000000000000000000000000000000000000000000123496000000000000000000000000000000000000000000000012332120000000000000 0000000000000000000000000000000000000000000000000004000033
|
33
|
-
70000000000000000335210001414731123725 1123725000004761310000001 01900000000000 1806080708 000000000000001872600132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000018726000000000000000000000000000000000000000000000001855120000000000000 0000000000000000000000000000000000000000000000000002000034
|
34
|
-
70000000000000000335210001414731123725 1123725000004761410000001 01900000000000 1806080708 000000000000000087300132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000000873000000000000000000000000000000000000000000000000069820000000000000 0000000000000000000000000000000000000000000000000008000035
|
35
|
-
70000000000000000335210001414731123725 1123725000004761510000001 01900000000000 1806080708 000000000000010889100132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000108891000000000000000000000000000000000000000000000010871620000000000000 0000000000000000000000000000000000000000000000000008000036
|
36
|
-
70000000000000000335210001414731123725 1123725000004761610000001 01900000000000 1806080708 000000000000001653800132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000016538000000000000000000000000000000000000000000000001636320000000000000 0000000000000000000000000000000000000000000000000008000037
|
37
|
-
70000000000000000335210001414731123725 1123725000004761710000001 01900000000000 1806080708 000000000000009108800132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000091088000000000000000000000000000000000000000000000009091320000000000000 0000000000000000000000000000000000000000000000000008000038
|
38
|
-
70000000000000000335210001414731123725 1123725000004761810000001 01900000000000 1806080708 000000000000011136500132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000111365000000000000000000000000000000000000000000000011119020000000000000 0000000000000000000000000000000000000000000000000008000039
|
39
|
-
70000000000000000335210001414731123725 1123725000004761910000001 01900000000000 1806080708 000000000000011209100132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000112091000000000000000000000000000000000000000000000011191620000000000000 0000000000000000000000000000000000000000000000000008000040
|
40
|
-
70000000000000000335210001414731123725 1123725000004762010000001 01900000000000 1806080708 000000000000010884300132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000108843000000000000000000000000000000000000000000000010866820000000000000 0000000000000000000000000000000000000000000000000008000041
|
41
|
-
70000000000000000335210001414731123725 1123725000004762110000001 01900000000000 1806080708 00000000000001040610012970X001007080000175000000000000000000000000000000000000000000000000000000000000000000000000104061000000000000000000000000000000000000000000000010388620000000000000 0000000000000000000000000000000000000000000000000002000042
|
42
|
-
70000000000000000335210001414731123725 1123725000004762210000001 01900000000000 1806080708 000000000000012373000132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000123730000000000000000000000000000000000000000000000012355520000000000000 0000000000000000000000000000000000000000000000000009000043
|
43
|
-
70000000000000000335210001414731123725 1123725000004762310000001 01900000000000 1806080708 000000000000012251700132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000122517000000000000000000000000000000000000000000000012234220000000000000 0000000000000000000000000000000000000000000000000009000044
|
44
|
-
70000000000000000335210001414731123725 1123725000004762410000001 01900000000000 1806080708 000000000000010641700130376001007080000175000000000000000000000000000000000000000000000000000000000000000000000000106417000000000000000000000000000000000000000000000010624220000000000000 0000000000000000000000000000000000000000000000000002000045
|
45
|
-
70000000000000000335210001414731123725 1123725000004762510000001 01900000000000 1806080708 000000000000002131000132905001007080000175000000000000000000000000000000000000000000000000000000000000000000000000021310000000000000000000000000000000000000000000000002113520000000000000 0000000000000000000000000000000000000000000000000002000046
|
46
|
-
70000000000000000335210001414731123725 1123725000004762610000001 01900000000000 1806080708 000000000000009677539918860001007080000175000000000000000000000000000000000000000000000000000000000000000000000000096775000000000000000000000000000000000000000000000009660020000000000000 0000000000000000000000000000000000000000000000000010000047
|
47
|
-
70000000000000000335210001414731123725 1123725000004762710000001 01900000000000 1806080708 000000000000009677539918860001007080000175000000000000000000000000000000000000000000000000000000000000000000000000096775000000000000000000000000000000000000000000000009660020000000000000 0000000000000000000000000000000000000000000000000010000048
|
48
|
-
70000000000000000335210001414731123725 1123725000004762810000001 01900000000000 1806080708 000000000000000633239918860001007080000175000000000000000000000000000000000000000000000000000000000000000000000000006332000000000000000000000000000000000000000000000000615720000000000000 0000000000000000000000000000000000000000000000000010000049
|
49
|
-
70000000000000000335210001414731123725 1123725000004762910000001 01900000000000 1806080708 000000000000010583400114923001007080000175000000000000000000000000000000000000000000000000000000000000000000000000105834000000000000000000000000000000000000000000000010565920000000000000 0000000000000000000000000000000000000000000000000004000050
|
50
|
-
70000000000000000335210001414731123725 1123725000004763110000001 01900000000000 1806080708 000000000000011637600130368001007080000175000000000000000000000000000000000000000000000000000000000000000000000000116376000000000000000000000000000000000000000000000011620120000000000000 0000000000000000000000000000000000000000000000000001000051
|
51
|
-
70000000000000000335210001414731123725 1123725000004763210000001 01900000000000 1806080708 000000000000011705200130368001007080000175000000000000000000000000000000000000000000000000000000000000000000000000117052000000000000000000000000000000000000000000000011687720000000000000 0000000000000000000000000000000000000000000000000001000052
|
1
|
+
02RETORNO01COBRANCA 33251000289353000000INSTITUTO MATO-GROSSENSE DO AL001BANCO DO BRASIL2001090000007 000000009703754590 1622420 000001
|
2
|
+
70000000000000000332510002893531622420 1622420000000000310000001 01900000000000 1806200109 000000000000000906400114923002201090000500000000000000000000000000000000000000000000000000000000000000000000000000009064000000000000000000000000000000000000000000000000856420000000000000 0000000000000000000000000000000000000000000000000004000002
|
3
|
+
70000000000000000332510002893531622420 1622420000000003010000001 01900000000000 1806200109 000000000000002235239909430002201090000500000000000000000000000000000000000000000000000000000000000000000000000000022352000000000000000000000000000000000000000000000002185220000000000000 0000000000000000000000000000000000000000000000000010000003
|
4
|
+
70000000000000000332510002893531622420 1622420000000003110000001 01900000000000 1806200109 00000000000000165330012970X002201090000500000000000000000000000000000000000000000000000000000000000000000000000000016533000000000000000000000000000000000000000000000001603320000000000000 0000000000000000000000000000000000000000000000000002000004
|
5
|
+
70000000000000000332510002893531622420 1622420000000003210000001 01900000000000 1806200109 00000000000000157740012970X002201090000500000000000000000000000000000000000000000000000000000000000000000000000000015774000000000000000000000000000000000000000000000001527420000000000000 0000000000000000000000000000000000000000000000000002000005
|
6
|
+
70000000000000000332510002893531622420 1622420000000003310000001 01900000000000 1806200109 00000000000000414440012970X002201090000500000000000000000000000000000000000000000000000000000000000000000000000000041444000000000000000000000000000000000000000000000004094420000000000000 0000000000000000000000000000000000000000000000000002000006
|
7
|
+
70000000000000000332510002893531622420 1622420000000003410000001 01900000000000 1806200109 00000000000000610280012970X002201090000500000000000000000000000000000000000000000000000000000000000000000000000000061028000000000000000000000000000000000000000000000006052820000000000000 0000000000000000000000000000000000000000000000000002000007
|
8
|
+
70000000000000000332510002893531622420 1622420000000003510000001 01900000000000 1806200109 00000000000000608040012970X002201090000500000000000000000000000000000000000000000000000000000000000000000000000000060804000000000000000000000000000000000000000000000006030420000000000000 0000000000000000000000000000000000000000000000000002000008
|
9
|
+
70000000000000000332510002893531622420 1622420000000003610000001 01900000000000 1806200109 000000000000005610074808110002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056100000000000000000000000000000000000000000000000005560020000000000000 0000000000000000000000000000000000000000000000000010000009
|
10
|
+
70000000000000000332510002893531622420 1622420000000003710000001 01900000000000 1806200109 000000000000000565474808110002201090000500000000000000000000000000000000000000000000000000000000000000000000000000005654000000000000000000000000000000000000000000000000515420000000000000 0000000000000000000000000000000000000000000000000010000010
|
11
|
+
70000000000000000332510002893531622420 1622420000000003810000001 01900000000000 1806200109 000000000000005610074808110002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056100000000000000000000000000000000000000000000000005560020000000000000 0000000000000000000000000000000000000000000000000010000011
|
12
|
+
70000000000000000332510002893531622420 1622420000000003910000001 01900000000000 1806200109 000000000000000528074808110002201090000500000000000000000000000000000000000000000000000000000000000000000000000000005280000000000000000000000000000000000000000000000000478020000000000000 0000000000000000000000000000000000000000000000000010000012
|
13
|
+
70000000000000000332510002893531622420 1622420000000004010000001 01900000000000 1806200109 000000000000005610074808110002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056100000000000000000000000000000000000000000000000005560020000000000000 0000000000000000000000000000000000000000000000000010000013
|
14
|
+
70000000000000000332510002893531622420 1622420000000004110000001 01900000000000 1806200109 000000000000000528074808110002201090000500000000000000000000000000000000000000000000000000000000000000000000000000005280000000000000000000000000000000000000000000000000478020000000000000 0000000000000000000000000000000000000000000000000010000014
|
15
|
+
70000000000000000332510002893531622420 1622420000000004210000001 01900000000000 1806200109 000000000000005610000136439002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056100000000000000000000000000000000000000000000000005560020000000000000 0000000000000000000000000000000000000000000000000004000015
|
16
|
+
70000000000000000332510002893531622420 1622420000000004310000001 01900000000000 1806200109 000000000000001672000136439002201090000500000000000000000000000000000000000000000000000000000000000000000000000000016720000000000000000000000000000000000000000000000001622020000000000000 0000000000000000000000000000000000000000000000000004000016
|
17
|
+
70000000000000000332510002893531622420 1622420000000004410000001 01900000000000 1806200109 000000000000000535300136439002201090000500000000000000000000000000000000000000000000000000000000000000000000000000005353000000000000000000000000000000000000000000000000485320000000000000 0000000000000000000000000000000000000000000000000004000017
|
18
|
+
70000000000000000332510002893531622420 1622420000000004510000001 01900000000000 1806200109 000000000000005210700130376002201090000500000000000000000000000000000000000000000000000000000000000000000000000000052107000000000000000000000000000000000000000000000005160720000000000000 0000000000000000000000000000000000000000000000000008000018
|
19
|
+
70000000000000000332510002893531622420 1622420000000004610000001 01900000000000 1806200109 000000000000006043600114923002201090000500000000000000000000000000000000000000000000000000000000000000000000000000060436000000000000000000000000000000000000000000000005993620000000000000 0000000000000000000000000000000000000000000000000002000019
|
20
|
+
70000000000000000332510002893531622420 1622420000000004710000001 01900000000000 1806200109 000000000000005610000136439002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056100000000000000000000000000000000000000000000000005560020000000000000 0000000000000000000000000000000000000000000000000004000020
|
21
|
+
70000000000000000332510002893531622420 1622420000000004810000001 01900000000000 1806200109 000000000000000495000136439002201090000500000000000000000000000000000000000000000000000000000000000000000000000000004950000000000000000000000000000000000000000000000000445020000000000000 0000000000000000000000000000000000000000000000000004000021
|
22
|
+
70000000000000000332510002893531622420 1622420000000005010000001 01900000000000 1806200109 000000000000005707000114923002201090000500000000000000000000000000000000000000000000000000000000000000000000000000057070000000000000000000000000000000000000000000000005657020000000000000 0000000000000000000000000000000000000000000000000002000022
|
23
|
+
70000000000000000332510002893531622420 1622420000000005110000001 01900000000000 1806200109 000000000000005638600106599002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056386000000000000000000000000000000000000000000000005588620000000000000 0000000000000000000000000000000000000000000000000002000023
|
24
|
+
70000000000000000332510002893531622420 1622420000000005210000001 01900000000000 1806200109 000000000000005610000106599002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056100000000000000000000000000000000000000000000000005560020000000000000 0000000000000000000000000000000000000000000000000002000024
|
25
|
+
70000000000000000332510002893531622420 1622420000000005310000001 01900000000000 1806200109 000000000000005856400106599002201090000500000000000000000000000000000000000000000000000000000000000000000000000000058564000000000000000000000000000000000000000000000005806420000000000000 0000000000000000000000000000000000000000000000000002000025
|
26
|
+
70000000000000000332510002893531622420 1622420000000005410000001 01900000000000 1806200109 000000000000005704600106599002201090000500000000000000000000000000000000000000000000000000000000000000000000000000057046000000000000000000000000000000000000000000000005654620000000000000 0000000000000000000000000000000000000000000000000002000026
|
27
|
+
70000000000000000332510002893531622420 1622420000000005510000001 01900000000000 1806200109 000000000000005673800106599002201090000500000000000000000000000000000000000000000000000000000000000000000000000000056738000000000000000000000000000000000000000000000005623820000000000000 0000000000000000000000000000000000000000000000000002000027
|
28
|
+
9201001 000000000000000000000000000000 000000000000000000000000000000 000000000000000000000000000000 000000000000000000000000000000 000000000000000000000000000000 000028
|
data/test/test_retorno_cbr643.rb
CHANGED
@@ -3,15 +3,64 @@ require File.join(File.dirname(__FILE__),'test_helper.rb')
|
|
3
3
|
class TestRetornoCbr643 < Test::Unit::TestCase #:nodoc:[all]
|
4
4
|
|
5
5
|
def test_should_correct_return_retorno
|
6
|
-
@pagamentos =
|
6
|
+
@pagamentos = RetornoCbr643.load_lines(File.join(File.dirname(__FILE__),'arquivos','CBR64310.RET'))
|
7
|
+
assert_equal("000001", @pagamentos.first.sequencial)
|
8
|
+
assert_equal("CA", @pagamentos.first.agencia_com_dv)
|
9
|
+
assert_equal("33251", @pagamentos.first.cedente_com_dv)
|
10
|
+
assert_equal("0002893", @pagamentos.first.convenio)
|
11
|
+
assert_equal("", @pagamentos.first.data_liquidacao)
|
12
|
+
assert_equal("", @pagamentos.first.data_credito)
|
13
|
+
assert_equal("", @pagamentos.first.valor_recebido)
|
14
|
+
assert_equal("OSSENSE DO AL001B", @pagamentos.first.nosso_numero)
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
def test_should_correct_return_retorno_except
|
19
|
+
@pagamentos = RetornoCbr643.load_lines(File.join(File.dirname(__FILE__),'arquivos','CBR64310.RET'),{:except => [1]})
|
20
|
+
assert_equal("000002", @pagamentos.first.sequencial)
|
21
|
+
assert_equal("33251", @pagamentos.first.agencia_com_dv)
|
22
|
+
assert_equal("000289353", @pagamentos.first.cedente_com_dv)
|
23
|
+
assert_equal("1622420", @pagamentos.first.convenio)
|
24
|
+
assert_equal("200109", @pagamentos.first.data_liquidacao)
|
25
|
+
assert_equal("220109", @pagamentos.first.data_credito)
|
26
|
+
assert_equal("0000000009064", @pagamentos.first.valor_recebido)
|
27
|
+
assert_equal("16224200000000003", @pagamentos.first.nosso_numero)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_should_correct_return_retorno_except_length
|
31
|
+
@pagamentos = RetornoCbr643.load_lines(File.join(File.dirname(__FILE__),'arquivos','CBR64310.RET'),{:except => [1], :length => 400})
|
32
|
+
assert_equal("000002", @pagamentos.first.sequencial)
|
33
|
+
assert_equal("33251", @pagamentos.first.agencia_com_dv)
|
34
|
+
assert_equal("000289353", @pagamentos.first.cedente_com_dv)
|
35
|
+
assert_equal("1622420", @pagamentos.first.convenio)
|
36
|
+
assert_equal("200109", @pagamentos.first.data_liquidacao)
|
37
|
+
assert_equal("220109", @pagamentos.first.data_credito)
|
38
|
+
assert_equal("0000000009064", @pagamentos.first.valor_recebido)
|
39
|
+
assert_equal("16224200000000003", @pagamentos.first.nosso_numero)
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_should_correct_return_retorno_except_regex
|
43
|
+
@pagamentos = RetornoCbr643.load_lines(File.join(File.dirname(__FILE__),'arquivos','CBR64310.RET'),{:except => /^[^7]/})
|
44
|
+
assert_equal("000002", @pagamentos.first.sequencial)
|
45
|
+
assert_equal("33251", @pagamentos.first.agencia_com_dv)
|
46
|
+
assert_equal("000289353", @pagamentos.first.cedente_com_dv)
|
47
|
+
assert_equal("1622420", @pagamentos.first.convenio)
|
48
|
+
assert_equal("200109", @pagamentos.first.data_liquidacao)
|
49
|
+
assert_equal("220109", @pagamentos.first.data_credito)
|
50
|
+
assert_equal("0000000009064", @pagamentos.first.valor_recebido)
|
51
|
+
assert_equal("16224200000000003", @pagamentos.first.nosso_numero)
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_should_correct_return_retorno_except_regex_length
|
55
|
+
@pagamentos = RetornoCbr643.load_lines(File.join(File.dirname(__FILE__),'arquivos','CBR64310.RET'),{:except => /^[^7]/, :length => 400})
|
7
56
|
assert_equal("000002", @pagamentos.first.sequencial)
|
8
|
-
assert_equal("
|
9
|
-
assert_equal("
|
10
|
-
assert_equal("
|
11
|
-
assert_equal("
|
12
|
-
assert_equal("
|
13
|
-
assert_equal("
|
14
|
-
assert_equal("
|
57
|
+
assert_equal("33251", @pagamentos.first.agencia_com_dv)
|
58
|
+
assert_equal("000289353", @pagamentos.first.cedente_com_dv)
|
59
|
+
assert_equal("1622420", @pagamentos.first.convenio)
|
60
|
+
assert_equal("200109", @pagamentos.first.data_liquidacao)
|
61
|
+
assert_equal("220109", @pagamentos.first.data_credito)
|
62
|
+
assert_equal("0000000009064", @pagamentos.first.valor_recebido)
|
63
|
+
assert_equal("16224200000000003", @pagamentos.first.nosso_numero)
|
15
64
|
end
|
16
65
|
|
17
66
|
end
|
data/website/index.html
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
<div class="sidebar">
|
35
35
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/brcobranca"; return false'>
|
36
36
|
<p>Fazer download</p>
|
37
|
-
<a href="http://rubyforge.org/projects/brcobranca" class="numbers">2.0.
|
37
|
+
<a href="http://rubyforge.org/projects/brcobranca" class="numbers">2.0.4</a>
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
<p>Gerador de bloquetos de cobrança para bancos brasileiros.</p>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brcobranca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kivanio Barbosa
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04
|
12
|
+
date: 2009-05-04 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.8.
|
23
|
+
version: 0.8.6
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rghost_barcode
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.0.
|
43
|
+
version: 1.0.3
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: newgem
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 1.4.1
|
54
54
|
version:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: hoe
|
@@ -80,7 +80,6 @@ files:
|
|
80
80
|
- README.rdoc
|
81
81
|
- Rakefile
|
82
82
|
- brcobranca.gemspec
|
83
|
-
- config/website.yml
|
84
83
|
- lib/brcobranca.rb
|
85
84
|
- lib/brcobranca/arquivos/logos/bb.jpg
|
86
85
|
- lib/brcobranca/arquivos/logos/bradesco.jpg
|
@@ -101,6 +100,7 @@ files:
|
|
101
100
|
- lib/brcobranca/config.rb
|
102
101
|
- lib/brcobranca/core_ext.rb
|
103
102
|
- lib/brcobranca/currency.rb
|
103
|
+
- lib/brcobranca/retorno/base.rb
|
104
104
|
- lib/brcobranca/retorno/retorno_cbr643.rb
|
105
105
|
- script/console
|
106
106
|
- script/destroy
|
@@ -151,7 +151,7 @@ rubyforge_project: brcobranca
|
|
151
151
|
rubygems_version: 1.3.2
|
152
152
|
signing_key:
|
153
153
|
specification_version: 3
|
154
|
-
summary: "Gem
|
154
|
+
summary: "Gem que permite trabalhar com cobran\xC3\xA7as via bancos brasileiros."
|
155
155
|
test_files:
|
156
156
|
- test/test_banco_bradesco.rb
|
157
157
|
- test/test_banco_brasil.rb
|
data/config/website.yml
DELETED