cnab240 0.0.17 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/cnab240.gemspec +2 -1
- data/lib/cnab240/arquivo/arquivo.rb +89 -60
- data/lib/cnab240/arquivo/builder.rb +162 -154
- data/lib/cnab240/arquivo/estrutura.rb +159 -95
- data/lib/cnab240/arquivo/lote.rb +57 -57
- data/lib/cnab240/arquivo/v40/header.rb +30 -30
- data/lib/cnab240/arquivo/v40/trailer.rb +11 -11
- data/lib/cnab240/arquivo/v80/header.rb +28 -27
- data/lib/cnab240/arquivo/v80/trailer.rb +11 -11
- data/lib/cnab240/arquivo/v83/header.rb +38 -0
- data/lib/cnab240/arquivo/v83/trailer.rb +17 -0
- data/lib/cnab240/arquivo/v86/header.rb +27 -28
- data/lib/cnab240/arquivo/v86/trailer.rb +12 -12
- data/lib/cnab240/arquivo/v87/header.rb +38 -0
- data/lib/cnab240/arquivo/v87/trailer.rb +18 -0
- data/lib/cnab240/ext/attribute_accessors.rb +2 -2
- data/lib/cnab240/ext/bindata.rb +9 -9
- data/lib/cnab240/ext/default_mixin.rb +11 -12
- data/lib/cnab240/ext/filler.rb +16 -16
- data/lib/cnab240/ext/lstring.rb +5 -5
- data/lib/cnab240/ext/segmento_mixin.rb +4 -4
- data/lib/cnab240/helper/helper.rb +15 -0
- data/lib/cnab240/helper/pagamento_bb.rb +51 -0
- data/lib/cnab240/helper/pagamento_bradesco.rb +49 -0
- data/lib/cnab240/helper/pagamento_itau.rb +34 -49
- data/lib/cnab240/helper/pagamento_sicoob.rb +55 -0
- data/lib/cnab240/pagamentos/v40/header.rb +35 -37
- data/lib/cnab240/pagamentos/v40/trailer.rb +13 -13
- data/lib/cnab240/pagamentos/v80/header.rb +45 -45
- data/lib/cnab240/pagamentos/v80/trailer.rb +13 -13
- data/lib/cnab240/pagamentos/v83/header.rb +45 -0
- data/lib/cnab240/pagamentos/v83/trailer.rb +18 -0
- data/lib/cnab240/pagamentos/v86/header.rb +44 -44
- data/lib/cnab240/pagamentos/v86/titulos/header.rb +44 -44
- data/lib/cnab240/pagamentos/v86/titulos/trailer.rb +14 -14
- data/lib/cnab240/pagamentos/v86/trailer.rb +14 -14
- data/lib/cnab240/pagamentos/v86/tributos/header.rb +45 -45
- data/lib/cnab240/pagamentos/v86/tributos/trailer.rb +12 -12
- data/lib/cnab240/pagamentos/v87/header.rb +46 -0
- data/lib/cnab240/pagamentos/v87/titulos/header.rb +46 -0
- data/lib/cnab240/pagamentos/v87/titulos/trailer.rb +18 -0
- data/lib/cnab240/pagamentos/v87/trailer.rb +18 -0
- data/lib/cnab240/pagamentos/v87/tributos/header.rb +47 -0
- data/lib/cnab240/pagamentos/v87/tributos/trailer.rb +17 -0
- data/lib/cnab240/segmentos/v40/segmento_a.rb +45 -48
- data/lib/cnab240/segmentos/v80/agencia_itau.rb +11 -12
- data/lib/cnab240/segmentos/v80/agencia_outros.rb +9 -10
- data/lib/cnab240/segmentos/v80/segmento_a.rb +59 -61
- data/lib/cnab240/segmentos/v83/segmento_a.rb +42 -0
- data/lib/cnab240/segmentos/v83/segmento_b.rb +40 -0
- data/lib/cnab240/segmentos/v83/segmento_j.rb +33 -0
- data/lib/cnab240/segmentos/v83/segmento_z.rb +19 -0
- data/lib/cnab240/segmentos/v86/segmento_a.rb +42 -45
- data/lib/cnab240/segmentos/v86/segmento_b.rb +38 -39
- data/lib/cnab240/segmentos/v86/segmento_c.rb +23 -24
- data/lib/cnab240/segmentos/v86/segmento_j.rb +25 -26
- data/lib/cnab240/segmentos/v86/segmento_j52.rb +22 -24
- data/lib/cnab240/segmentos/v86/segmento_n.rb +50 -51
- data/lib/cnab240/segmentos/v86/segmento_n1.rb +13 -15
- data/lib/cnab240/segmentos/v86/segmento_n2.rb +15 -17
- data/lib/cnab240/segmentos/v86/segmento_n3.rb +15 -17
- data/lib/cnab240/segmentos/v86/segmento_n4.rb +17 -19
- data/lib/cnab240/segmentos/v86/segmento_n5.rb +15 -17
- data/lib/cnab240/segmentos/v86/segmento_n6.rb +15 -17
- data/lib/cnab240/segmentos/v86/segmento_n7.rb +16 -18
- data/lib/cnab240/segmentos/v86/segmento_n8.rb +15 -18
- data/lib/cnab240/segmentos/v86/segmento_o.rb +20 -21
- data/lib/cnab240/segmentos/v86/segmento_w.rb +16 -17
- data/lib/cnab240/segmentos/v86/segmento_w1.rb +12 -13
- data/lib/cnab240/segmentos/v86/segmento_z.rb +14 -14
- data/lib/cnab240/segmentos/v87/segmento_a.rb +44 -0
- data/lib/cnab240/segmentos/v87/segmento_b.rb +40 -0
- data/lib/cnab240/segmentos/v87/segmento_c.rb +32 -0
- data/lib/cnab240/segmentos/v87/segmento_j.rb +33 -0
- data/lib/cnab240/segmentos/v87/segmento_j52.rb +32 -0
- data/lib/cnab240/segmentos/v87/segmento_n.rb +59 -0
- data/lib/cnab240/segmentos/v87/segmento_n1.rb +19 -0
- data/lib/cnab240/segmentos/v87/segmento_n2.rb +21 -0
- data/lib/cnab240/segmentos/v87/segmento_n3.rb +21 -0
- data/lib/cnab240/segmentos/v87/segmento_n4.rb +23 -0
- data/lib/cnab240/segmentos/v87/segmento_n5.rb +21 -0
- data/lib/cnab240/segmentos/v87/segmento_n6.rb +21 -0
- data/lib/cnab240/segmentos/v87/segmento_n7.rb +21 -0
- data/lib/cnab240/segmentos/v87/segmento_n8.rb +22 -0
- data/lib/cnab240/segmentos/v87/segmento_o.rb +27 -0
- data/lib/cnab240/segmentos/v87/segmento_w.rb +24 -0
- data/lib/cnab240/segmentos/v87/segmento_w1.rb +16 -0
- data/lib/cnab240/segmentos/v87/segmento_z.rb +19 -0
- data/lib/cnab240/version.rb +1 -2
- data/lib/cnab240.rb +54 -24
- metadata +64 -133
- data/.gitignore +0 -19
- data/.rspec +0 -2
- data/.travis.yml +0 -4
- data/Gemfile +0 -6
- data/LICENSE +0 -22
- data/README.md +0 -135
- data/docs/vendor/febraban/subcpadr12_layout_padrao_V86.pdf +0 -0
- data/docs/vendor/itau/SISPAG_CNAB_240.pdf +0 -0
- data/docs/vendor/itau/sisdeb_cnab_240.pdf +0 -0
- data/spec/arquivo/arquivo_spec.rb +0 -95
- data/spec/arquivo/v40/header_spec.rb +0 -68
- data/spec/arquivo/v40/trailer_spec.rb +0 -25
- data/spec/arquivo/v80/header_spec.rb +0 -60
- data/spec/arquivo/v80/trailer_spec.rb +0 -26
- data/spec/arquivo/v86/header_spec.rb +0 -89
- data/spec/arquivo/v86/trailer_spec.rb +0 -27
- data/spec/bindata/bindata_spec.rb +0 -55
- data/spec/cnab240_spec.rb +0 -22
- data/spec/helper/pagamento_itau_spec.rb +0 -83
- data/spec/hom/hom_spec.rb +0 -65
- data/spec/hom/retorno/SB22112AIT.RET +0 -5
- data/spec/hom/retorno/SB23112AIT.RET +0 -5
- data/spec/pagamentos/v40/header_spec.rb +0 -59
- data/spec/pagamentos/v40/lote_spec.rb +0 -25
- data/spec/pagamentos/v40/trailer_spec.rb +0 -28
- data/spec/pagamentos/v80/header_spec.rb +0 -52
- data/spec/pagamentos/v80/lote_spec.rb +0 -25
- data/spec/pagamentos/v80/trailer_spec.rb +0 -28
- data/spec/pagamentos/v86/header_spec.rb +0 -53
- data/spec/pagamentos/v86/lote_spec.rb +0 -38
- data/spec/pagamentos/v86/titulos/header_spec.rb +0 -51
- data/spec/pagamentos/v86/titulos/lote_spec.rb +0 -37
- data/spec/pagamentos/v86/titulos/trailer_spec.rb +0 -30
- data/spec/pagamentos/v86/trailer_spec.rb +0 -30
- data/spec/pagamentos/v86/tributos/header_spec.rb +0 -53
- data/spec/pagamentos/v86/tributos/lote_spec.rb +0 -43
- data/spec/pagamentos/v86/tributos/trailer_spec.rb +0 -27
- data/spec/segmentos/v40/segmento_a_spec.rb +0 -70
- data/spec/segmentos/v80/segmento_a_spec.rb +0 -70
- data/spec/segmentos/v86/segmento_a_spec.rb +0 -65
- data/spec/segmentos/v86/segmento_b_spec.rb +0 -67
- data/spec/segmentos/v86/segmento_c_spec.rb +0 -51
- data/spec/segmentos/v86/segmento_j52_spec.rb +0 -55
- data/spec/segmentos/v86/segmento_j_spec.rb +0 -55
- data/spec/segmentos/v86/segmento_n1_spec.rb +0 -43
- data/spec/segmentos/v86/segmento_n2_spec.rb +0 -46
- data/spec/segmentos/v86/segmento_n3_spec.rb +0 -45
- data/spec/segmentos/v86/segmento_n4_spec.rb +0 -47
- data/spec/segmentos/v86/segmento_n5_spec.rb +0 -45
- data/spec/segmentos/v86/segmento_n6_spec.rb +0 -45
- data/spec/segmentos/v86/segmento_n7_spec.rb +0 -46
- data/spec/segmentos/v86/segmento_n8_spec.rb +0 -45
- data/spec/segmentos/v86/segmento_n_spec.rb +0 -73
- data/spec/segmentos/v86/segmento_o_spec.rb +0 -50
- data/spec/segmentos/v86/segmento_spec.rb +0 -12
- data/spec/segmentos/v86/segmento_w_spec.rb +0 -51
- data/spec/segmentos/v86/segmento_z_spec.rb +0 -42
- data/spec/spec_helper.rb +0 -10
- data/spec/tmp/.gitkeep +0 -0
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
include Cnab240::V86
|
4
|
-
|
5
|
-
describe SegmentoZ do
|
6
|
-
|
7
|
-
it "deve instanciar segmento" do
|
8
|
-
segmento = SegmentoZ.new
|
9
|
-
segmento.should be_an_instance_of(SegmentoZ)
|
10
|
-
end
|
11
|
-
|
12
|
-
it "deve conter campos" do
|
13
|
-
segmento = SegmentoZ.new
|
14
|
-
|
15
|
-
segmento.should respond_to(:controle_banco)
|
16
|
-
segmento.should respond_to(:controle_lote)
|
17
|
-
segmento.should respond_to(:controle_registro)
|
18
|
-
|
19
|
-
segmento.should respond_to(:servico_numero_registro)
|
20
|
-
segmento.should respond_to(:servico_codigo_segmento)
|
21
|
-
|
22
|
-
segmento.should respond_to(:autenticacao)
|
23
|
-
segmento.should respond_to(:controle_bancario)
|
24
|
-
segmento.should respond_to(:cnab_g004_1)
|
25
|
-
segmento.should respond_to(:ocorrencias)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "deve ter 240 caracteres" do
|
29
|
-
segmento = SegmentoZ.new
|
30
|
-
segmento.linha.length.should be(240)
|
31
|
-
end
|
32
|
-
|
33
|
-
it "deve manter coesao" do
|
34
|
-
c = SegmentoZ
|
35
|
-
obj = c.new
|
36
|
-
linha1 = obj.linha
|
37
|
-
obj2 = c.read(linha1)
|
38
|
-
linha2 = obj2.linha
|
39
|
-
linha1.should eq linha2
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
data/spec/spec_helper.rb
DELETED
data/spec/tmp/.gitkeep
DELETED
File without changes
|