cnab240 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cnab240/arquivo/arquivo.rb +34 -9
- data/lib/cnab240/arquivo/estrutura.rb +1 -0
- data/lib/cnab240/arquivo/header.rb +5 -5
- data/lib/cnab240/arquivo/lote.rb +15 -4
- data/lib/cnab240/arquivo/trailer.rb +2 -2
- data/lib/cnab240/{core_ext → ext}/bindata.rb +1 -1
- data/lib/cnab240/{core_ext → ext}/default_mixin.rb +1 -0
- data/lib/cnab240/ext/segmento_mixin.rb +7 -0
- data/lib/cnab240/pagamentos/header.rb +2 -2
- data/lib/cnab240/pagamentos/titulos/header.rb +2 -2
- data/lib/cnab240/pagamentos/titulos/trailer.rb +1 -1
- data/lib/cnab240/pagamentos/trailer.rb +1 -1
- data/lib/cnab240/pagamentos/tributos/header.rb +2 -2
- data/lib/cnab240/pagamentos/tributos/trailer.rb +1 -1
- data/lib/cnab240/segmentos/segmento_a.rb +2 -1
- data/lib/cnab240/segmentos/segmento_b.rb +2 -1
- data/lib/cnab240/segmentos/segmento_c.rb +2 -1
- data/lib/cnab240/segmentos/segmento_j.rb +2 -1
- data/lib/cnab240/segmentos/segmento_j52.rb +3 -2
- data/lib/cnab240/segmentos/segmento_n.rb +37 -3
- data/lib/cnab240/segmentos/segmento_n1.rb +21 -0
- data/lib/cnab240/segmentos/segmento_n2.rb +23 -0
- data/lib/cnab240/segmentos/segmento_n3.rb +23 -0
- data/lib/cnab240/segmentos/segmento_n4.rb +25 -0
- data/lib/cnab240/segmentos/segmento_n5.rb +23 -0
- data/lib/cnab240/segmentos/segmento_n6.rb +23 -0
- data/lib/cnab240/segmentos/segmento_n7.rb +23 -0
- data/lib/cnab240/segmentos/segmento_n8.rb +25 -0
- data/lib/cnab240/segmentos/segmento_o.rb +2 -1
- data/lib/cnab240/segmentos/segmento_w.rb +2 -1
- data/lib/cnab240/segmentos/segmento_w1.rb +1 -0
- data/lib/cnab240/segmentos/segmento_z.rb +2 -1
- data/lib/cnab240/version.rb +1 -1
- data/lib/cnab240.rb +12 -3
- data/spec/arquivo/arquivo_spec.rb +29 -2
- data/spec/arquivo/header_spec.rb +43 -0
- data/spec/bindata/bindata_spec.rb +40 -0
- data/spec/segmentos/segmento_a_spec.rb +9 -0
- data/spec/segmentos/segmento_b_spec.rb +9 -0
- data/spec/segmentos/segmento_c_spec.rb +9 -0
- data/spec/segmentos/segmento_j52_spec.rb +9 -0
- data/spec/segmentos/segmento_j_spec.rb +9 -0
- data/spec/segmentos/segmento_n1_spec.rb +43 -0
- data/spec/segmentos/segmento_n2_spec.rb +46 -0
- data/spec/segmentos/segmento_n3_spec.rb +45 -0
- data/spec/segmentos/segmento_n4_spec.rb +47 -0
- data/spec/segmentos/segmento_n5_spec.rb +45 -0
- data/spec/segmentos/segmento_n6_spec.rb +45 -0
- data/spec/segmentos/segmento_n7_spec.rb +46 -0
- data/spec/segmentos/segmento_n8_spec.rb +45 -0
- data/spec/segmentos/segmento_n_spec.rb +34 -1
- data/spec/segmentos/segmento_o_spec.rb +9 -0
- data/spec/segmentos/segmento_spec.rb +12 -0
- data/spec/segmentos/segmento_w_spec.rb +9 -0
- data/spec/segmentos/segmento_z_spec.rb +9 -0
- metadata +36 -7
- /data/lib/cnab240/{core_ext → ext}/attribute_accessors.rb +0 -0
@@ -39,4 +39,13 @@ describe SegmentoW do
|
|
39
39
|
segmento.linha.length.should be(240)
|
40
40
|
end
|
41
41
|
|
42
|
+
it "deve manter coesao" do
|
43
|
+
c = Cnab240::SegmentoW
|
44
|
+
obj = c.new
|
45
|
+
linha1 = obj.linha
|
46
|
+
obj2 = c.read(linha1)
|
47
|
+
linha2 = obj2.linha
|
48
|
+
linha1.should eq linha2
|
49
|
+
end
|
50
|
+
|
42
51
|
end
|
@@ -30,4 +30,13 @@ describe SegmentoZ do
|
|
30
30
|
segmento.linha.length.should be(240)
|
31
31
|
end
|
32
32
|
|
33
|
+
it "deve manter coesao" do
|
34
|
+
c = Cnab240::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
|
+
|
33
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cnab240
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -64,9 +64,10 @@ files:
|
|
64
64
|
- lib/cnab240/arquivo/header.rb
|
65
65
|
- lib/cnab240/arquivo/lote.rb
|
66
66
|
- lib/cnab240/arquivo/trailer.rb
|
67
|
-
- lib/cnab240/
|
68
|
-
- lib/cnab240/
|
69
|
-
- lib/cnab240/
|
67
|
+
- lib/cnab240/ext/attribute_accessors.rb
|
68
|
+
- lib/cnab240/ext/bindata.rb
|
69
|
+
- lib/cnab240/ext/default_mixin.rb
|
70
|
+
- lib/cnab240/ext/segmento_mixin.rb
|
70
71
|
- lib/cnab240/pagamentos/header.rb
|
71
72
|
- lib/cnab240/pagamentos/titulos/header.rb
|
72
73
|
- lib/cnab240/pagamentos/titulos/trailer.rb
|
@@ -79,6 +80,14 @@ files:
|
|
79
80
|
- lib/cnab240/segmentos/segmento_j.rb
|
80
81
|
- lib/cnab240/segmentos/segmento_j52.rb
|
81
82
|
- lib/cnab240/segmentos/segmento_n.rb
|
83
|
+
- lib/cnab240/segmentos/segmento_n1.rb
|
84
|
+
- lib/cnab240/segmentos/segmento_n2.rb
|
85
|
+
- lib/cnab240/segmentos/segmento_n3.rb
|
86
|
+
- lib/cnab240/segmentos/segmento_n4.rb
|
87
|
+
- lib/cnab240/segmentos/segmento_n5.rb
|
88
|
+
- lib/cnab240/segmentos/segmento_n6.rb
|
89
|
+
- lib/cnab240/segmentos/segmento_n7.rb
|
90
|
+
- lib/cnab240/segmentos/segmento_n8.rb
|
82
91
|
- lib/cnab240/segmentos/segmento_o.rb
|
83
92
|
- lib/cnab240/segmentos/segmento_w.rb
|
84
93
|
- lib/cnab240/segmentos/segmento_w1.rb
|
@@ -87,6 +96,7 @@ files:
|
|
87
96
|
- spec/arquivo/arquivo_spec.rb
|
88
97
|
- spec/arquivo/header_spec.rb
|
89
98
|
- spec/arquivo/trailer_spec.rb
|
99
|
+
- spec/bindata/bindata_spec.rb
|
90
100
|
- spec/cnab240_spec.rb
|
91
101
|
- spec/pagamentos/header_spec.rb
|
92
102
|
- spec/pagamentos/lote_spec.rb
|
@@ -102,8 +112,17 @@ files:
|
|
102
112
|
- spec/segmentos/segmento_c_spec.rb
|
103
113
|
- spec/segmentos/segmento_j52_spec.rb
|
104
114
|
- spec/segmentos/segmento_j_spec.rb
|
115
|
+
- spec/segmentos/segmento_n1_spec.rb
|
116
|
+
- spec/segmentos/segmento_n2_spec.rb
|
117
|
+
- spec/segmentos/segmento_n3_spec.rb
|
118
|
+
- spec/segmentos/segmento_n4_spec.rb
|
119
|
+
- spec/segmentos/segmento_n5_spec.rb
|
120
|
+
- spec/segmentos/segmento_n6_spec.rb
|
121
|
+
- spec/segmentos/segmento_n7_spec.rb
|
122
|
+
- spec/segmentos/segmento_n8_spec.rb
|
105
123
|
- spec/segmentos/segmento_n_spec.rb
|
106
124
|
- spec/segmentos/segmento_o_spec.rb
|
125
|
+
- spec/segmentos/segmento_spec.rb
|
107
126
|
- spec/segmentos/segmento_w_spec.rb
|
108
127
|
- spec/segmentos/segmento_z_spec.rb
|
109
128
|
- spec/spec_helper.rb
|
@@ -122,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
141
|
version: '0'
|
123
142
|
segments:
|
124
143
|
- 0
|
125
|
-
hash:
|
144
|
+
hash: 3997540491030980923
|
126
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
146
|
none: false
|
128
147
|
requirements:
|
@@ -131,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
150
|
version: '0'
|
132
151
|
segments:
|
133
152
|
- 0
|
134
|
-
hash:
|
153
|
+
hash: 3997540491030980923
|
135
154
|
requirements: []
|
136
155
|
rubyforge_project: cnab240
|
137
156
|
rubygems_version: 1.8.24
|
@@ -142,6 +161,7 @@ test_files:
|
|
142
161
|
- spec/arquivo/arquivo_spec.rb
|
143
162
|
- spec/arquivo/header_spec.rb
|
144
163
|
- spec/arquivo/trailer_spec.rb
|
164
|
+
- spec/bindata/bindata_spec.rb
|
145
165
|
- spec/cnab240_spec.rb
|
146
166
|
- spec/pagamentos/header_spec.rb
|
147
167
|
- spec/pagamentos/lote_spec.rb
|
@@ -157,8 +177,17 @@ test_files:
|
|
157
177
|
- spec/segmentos/segmento_c_spec.rb
|
158
178
|
- spec/segmentos/segmento_j52_spec.rb
|
159
179
|
- spec/segmentos/segmento_j_spec.rb
|
180
|
+
- spec/segmentos/segmento_n1_spec.rb
|
181
|
+
- spec/segmentos/segmento_n2_spec.rb
|
182
|
+
- spec/segmentos/segmento_n3_spec.rb
|
183
|
+
- spec/segmentos/segmento_n4_spec.rb
|
184
|
+
- spec/segmentos/segmento_n5_spec.rb
|
185
|
+
- spec/segmentos/segmento_n6_spec.rb
|
186
|
+
- spec/segmentos/segmento_n7_spec.rb
|
187
|
+
- spec/segmentos/segmento_n8_spec.rb
|
160
188
|
- spec/segmentos/segmento_n_spec.rb
|
161
189
|
- spec/segmentos/segmento_o_spec.rb
|
190
|
+
- spec/segmentos/segmento_spec.rb
|
162
191
|
- spec/segmentos/segmento_w_spec.rb
|
163
192
|
- spec/segmentos/segmento_z_spec.rb
|
164
193
|
- spec/spec_helper.rb
|
File without changes
|