br_boleto 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +13 -0
  5. data/LICENSE +1 -1
  6. data/README.markdown +22 -7
  7. data/br_boleto.gemspec +9 -7
  8. data/lib/br_boleto/active_model_base.rb +28 -0
  9. data/lib/br_boleto/boleto/base.rb +666 -633
  10. data/lib/br_boleto/boleto/caixa.rb +257 -0
  11. data/lib/br_boleto/boleto/sicoob.rb +6 -18
  12. data/lib/br_boleto/helper/format_value.rb +18 -0
  13. data/lib/br_boleto/remessa/base.rb +1 -22
  14. data/lib/br_boleto/remessa/cnab240/base.rb +12 -9
  15. data/lib/br_boleto/remessa/cnab240/caixa.rb +201 -0
  16. data/lib/br_boleto/remessa/cnab240/helper/header_arquivo.rb +2 -2
  17. data/lib/br_boleto/remessa/cnab240/helper/header_lote.rb +10 -1
  18. data/lib/br_boleto/remessa/cnab240/helper/segmento_p.rb +2 -2
  19. data/lib/br_boleto/remessa/cnab240/helper/segmento_q.rb +2 -2
  20. data/lib/br_boleto/remessa/cnab240/helper/trailer_arquivo.rb +7 -0
  21. data/lib/br_boleto/remessa/cnab240/sicoob.rb +6 -6
  22. data/lib/br_boleto/remessa/lote.rb +1 -21
  23. data/lib/br_boleto/remessa/pagamento.rb +22 -36
  24. data/lib/br_boleto/retorno/base.rb +31 -0
  25. data/lib/br_boleto/retorno/cnab240/base.rb +101 -0
  26. data/lib/br_boleto/retorno/cnab240/caixa.rb +30 -0
  27. data/lib/br_boleto/retorno/cnab240/sicoob.rb +35 -0
  28. data/lib/br_boleto/retorno/pagamento.rb +242 -0
  29. data/lib/br_boleto/version.rb +2 -2
  30. data/lib/br_boleto.rb +23 -11
  31. data/test/br_boleto/boleto/base_test.rb +6 -6
  32. data/test/br_boleto/boleto/caixa_test.rb +191 -0
  33. data/test/br_boleto/boleto/sicoob_test.rb +18 -11
  34. data/test/br_boleto/remessa/cnab240/base_test.rb +5 -5
  35. data/test/br_boleto/remessa/cnab240/caixa_test.rb +271 -0
  36. data/test/br_boleto/remessa/cnab240/helper/header_arquivo_test.rb +2 -2
  37. data/test/br_boleto/remessa/cnab240/helper/segmento_p_test.rb +1 -1
  38. data/test/br_boleto/remessa/cnab240/sicoob_test.rb +27 -27
  39. data/test/br_boleto/remessa/pagamento_test.rb +12 -2
  40. data/test/br_boleto/retorno/cnab240/base_test.rb +217 -0
  41. data/test/br_boleto/retorno/cnab240/caixa_test.rb +217 -0
  42. data/test/br_boleto/retorno/cnab240/sicoob_test.rb +217 -0
  43. data/test/br_boleto/retorno/pagamento_test.rb +179 -0
  44. data/test/factories/boleto/boleto_caixa.rb +25 -0
  45. data/test/factories/remessa/cnab240/caixa.rb +14 -0
  46. data/test/factories/remessa/pagamento.rb +1 -0
  47. data/test/factories/retorno/pagamento.rb +6 -0
  48. data/test/files/retorno/cnab240/caixa.ret +14 -0
  49. data/test/files/retorno/cnab240/padrao240.ret +14 -0
  50. metadata +51 -6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_boleto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno M. Mergen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-20 00:00:00.000000000 Z
11
+ date: 2016-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: unidecoder
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.1'
55
69
  description: Emissão de Boletos Bancários em Ruby
56
70
  email:
57
71
  - brunomergen@gmail.com
@@ -59,6 +73,7 @@ executables: []
59
73
  extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
76
+ - ".gitignore"
62
77
  - ".travis.yml"
63
78
  - Gemfile
64
79
  - Gemfile.lock
@@ -68,7 +83,9 @@ files:
68
83
  - Rakefile
69
84
  - br_boleto.gemspec
70
85
  - lib/br_boleto.rb
86
+ - lib/br_boleto/active_model_base.rb
71
87
  - lib/br_boleto/boleto/base.rb
88
+ - lib/br_boleto/boleto/caixa.rb
72
89
  - lib/br_boleto/boleto/sicoob.rb
73
90
  - lib/br_boleto/calculos/digitos.rb
74
91
  - lib/br_boleto/calculos/fator_vencimento.rb
@@ -84,9 +101,11 @@ files:
84
101
  - lib/br_boleto/calculos/modulo11_fator_de9a2_resto_x.rb
85
102
  - lib/br_boleto/calculos/modulo_numero_de_controle.rb
86
103
  - lib/br_boleto/helper/cpf_cnpj.rb
104
+ - lib/br_boleto/helper/format_value.rb
87
105
  - lib/br_boleto/helper/number.rb
88
106
  - lib/br_boleto/remessa/base.rb
89
107
  - lib/br_boleto/remessa/cnab240/base.rb
108
+ - lib/br_boleto/remessa/cnab240/caixa.rb
90
109
  - lib/br_boleto/remessa/cnab240/helper/header_arquivo.rb
91
110
  - lib/br_boleto/remessa/cnab240/helper/header_lote.rb
92
111
  - lib/br_boleto/remessa/cnab240/helper/segmento_p.rb
@@ -98,9 +117,15 @@ files:
98
117
  - lib/br_boleto/remessa/cnab240/sicoob.rb
99
118
  - lib/br_boleto/remessa/lote.rb
100
119
  - lib/br_boleto/remessa/pagamento.rb
120
+ - lib/br_boleto/retorno/base.rb
121
+ - lib/br_boleto/retorno/cnab240/base.rb
122
+ - lib/br_boleto/retorno/cnab240/caixa.rb
123
+ - lib/br_boleto/retorno/cnab240/sicoob.rb
124
+ - lib/br_boleto/retorno/pagamento.rb
101
125
  - lib/br_boleto/string_methods.rb
102
126
  - lib/br_boleto/version.rb
103
127
  - test/br_boleto/boleto/base_test.rb
128
+ - test/br_boleto/boleto/caixa_test.rb
104
129
  - test/br_boleto/boleto/sicoob_test.rb
105
130
  - test/br_boleto/calculos/digitos_test.rb
106
131
  - test/br_boleto/calculos/fator_vencimento_test.rb
@@ -117,6 +142,7 @@ files:
117
142
  - test/br_boleto/calculos/modulo_numero_de_controle_test.rb
118
143
  - test/br_boleto/remessa/base_test.rb
119
144
  - test/br_boleto/remessa/cnab240/base_test.rb
145
+ - test/br_boleto/remessa/cnab240/caixa_test.rb
120
146
  - test/br_boleto/remessa/cnab240/helper/header_arquivo_test.rb
121
147
  - test/br_boleto/remessa/cnab240/helper/header_lote_test.rb
122
148
  - test/br_boleto/remessa/cnab240/helper/segmento_p_test.rb
@@ -128,19 +154,28 @@ files:
128
154
  - test/br_boleto/remessa/cnab240/sicoob_test.rb
129
155
  - test/br_boleto/remessa/lote_test.rb
130
156
  - test/br_boleto/remessa/pagamento_test.rb
157
+ - test/br_boleto/retorno/cnab240/base_test.rb
158
+ - test/br_boleto/retorno/cnab240/caixa_test.rb
159
+ - test/br_boleto/retorno/cnab240/sicoob_test.rb
160
+ - test/br_boleto/retorno/pagamento_test.rb
131
161
  - test/factories/boleto/base.rb
162
+ - test/factories/boleto/boleto_caixa.rb
132
163
  - test/factories/boleto/boleto_sicoob.rb
133
164
  - test/factories/remessa/base.rb
134
165
  - test/factories/remessa/cnab240/base.rb
166
+ - test/factories/remessa/cnab240/caixa.rb
135
167
  - test/factories/remessa/cnab240/sicoob.rb
136
168
  - test/factories/remessa/lote.rb
137
169
  - test/factories/remessa/pagamento.rb
170
+ - test/factories/retorno/pagamento.rb
171
+ - test/files/retorno/cnab240/caixa.ret
172
+ - test/files/retorno/cnab240/padrao240.ret
138
173
  - test/inheritance/boleto_test.rb
139
174
  - test/inheritance/sicoob_test.rb
140
175
  - test/test_helper.rb
141
176
  homepage: https://github.com/Brunomm/br_boleto
142
177
  licenses:
143
- - BSD
178
+ - MIT
144
179
  metadata: {}
145
180
  post_install_message:
146
181
  rdoc_options: []
@@ -148,7 +183,7 @@ require_paths:
148
183
  - lib
149
184
  required_ruby_version: !ruby/object:Gem::Requirement
150
185
  requirements:
151
- - - ">="
186
+ - - "~>"
152
187
  - !ruby/object:Gem::Version
153
188
  version: '2.1'
154
189
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -158,12 +193,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
193
  version: '0'
159
194
  requirements: []
160
195
  rubyforge_project:
161
- rubygems_version: 2.4.6
196
+ rubygems_version: 2.5.1
162
197
  signing_key:
163
198
  specification_version: 4
164
199
  summary: Emissão de Boletos Bancários em Ruby
165
200
  test_files:
166
201
  - test/br_boleto/boleto/base_test.rb
202
+ - test/br_boleto/boleto/caixa_test.rb
167
203
  - test/br_boleto/boleto/sicoob_test.rb
168
204
  - test/br_boleto/calculos/digitos_test.rb
169
205
  - test/br_boleto/calculos/fator_vencimento_test.rb
@@ -180,6 +216,7 @@ test_files:
180
216
  - test/br_boleto/calculos/modulo_numero_de_controle_test.rb
181
217
  - test/br_boleto/remessa/base_test.rb
182
218
  - test/br_boleto/remessa/cnab240/base_test.rb
219
+ - test/br_boleto/remessa/cnab240/caixa_test.rb
183
220
  - test/br_boleto/remessa/cnab240/helper/header_arquivo_test.rb
184
221
  - test/br_boleto/remessa/cnab240/helper/header_lote_test.rb
185
222
  - test/br_boleto/remessa/cnab240/helper/segmento_p_test.rb
@@ -191,13 +228,21 @@ test_files:
191
228
  - test/br_boleto/remessa/cnab240/sicoob_test.rb
192
229
  - test/br_boleto/remessa/lote_test.rb
193
230
  - test/br_boleto/remessa/pagamento_test.rb
231
+ - test/br_boleto/retorno/cnab240/base_test.rb
232
+ - test/br_boleto/retorno/cnab240/caixa_test.rb
233
+ - test/br_boleto/retorno/cnab240/sicoob_test.rb
234
+ - test/br_boleto/retorno/pagamento_test.rb
194
235
  - test/factories/boleto/base.rb
236
+ - test/factories/boleto/boleto_caixa.rb
195
237
  - test/factories/boleto/boleto_sicoob.rb
196
238
  - test/factories/remessa/base.rb
197
239
  - test/factories/remessa/cnab240/base.rb
240
+ - test/factories/remessa/cnab240/caixa.rb
198
241
  - test/factories/remessa/cnab240/sicoob.rb
199
242
  - test/factories/remessa/lote.rb
200
243
  - test/factories/remessa/pagamento.rb
244
+ - test/factories/retorno/pagamento.rb
245
+ - test/files/retorno/cnab240/caixa.ret
246
+ - test/files/retorno/cnab240/padrao240.ret
201
247
  - test/inheritance/boleto_test.rb
202
248
  - test/inheritance/sicoob_test.rb
203
- has_rdoc: