boleto_bancario 0.0.1.beta → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/Changelog.markdown +58 -2
  3. data/README.markdown +679 -156
  4. data/lib/boleto_bancario/calculos/documento.rb +191 -0
  5. data/lib/boleto_bancario/calculos/fator_vencimento.rb +78 -31
  6. data/lib/boleto_bancario/calculos/modulo11_fator_de9a2.rb +65 -0
  7. data/lib/boleto_bancario/calculos/modulo11_fator_de9a2_resto_x.rb +5 -51
  8. data/lib/boleto_bancario/calculos/modulo_numero_de_controle.rb +117 -0
  9. data/lib/boleto_bancario/core/banco_brasil.rb +30 -5
  10. data/lib/boleto_bancario/core/banrisul.rb +182 -0
  11. data/lib/boleto_bancario/core/boleto.rb +97 -35
  12. data/lib/boleto_bancario/core/bradesco.rb +28 -16
  13. data/lib/boleto_bancario/core/c6_bank.rb +155 -0
  14. data/lib/boleto_bancario/core/caixa.rb +233 -0
  15. data/lib/boleto_bancario/core/inter.rb +155 -0
  16. data/lib/boleto_bancario/core/itau.rb +20 -10
  17. data/lib/boleto_bancario/core/nubank.rb +156 -0
  18. data/lib/boleto_bancario/core/santander.rb +19 -22
  19. data/lib/boleto_bancario/core/sicoob.rb +172 -0
  20. data/lib/boleto_bancario/core/sicredi.rb +290 -0
  21. data/lib/boleto_bancario/locales/pt-BR.yml +55 -0
  22. data/lib/boleto_bancario/renderers/base.rb +154 -0
  23. data/lib/boleto_bancario/renderers/html_renderer.rb +92 -0
  24. data/lib/boleto_bancario/renderers/pdf_renderer.rb +130 -0
  25. data/lib/boleto_bancario/renderers/png_renderer.rb +66 -0
  26. data/lib/boleto_bancario/templates/_barcode.html.erb +3 -0
  27. data/lib/boleto_bancario/templates/_cedente.html.erb +14 -0
  28. data/lib/boleto_bancario/templates/_header.html.erb +4 -0
  29. data/lib/boleto_bancario/templates/_instructions.html.erb +10 -0
  30. data/lib/boleto_bancario/templates/_payment.html.erb +36 -0
  31. data/lib/boleto_bancario/templates/_sacado.html.erb +10 -0
  32. data/lib/boleto_bancario/templates/boleto.html.erb +22 -0
  33. data/lib/boleto_bancario/templates/boleto_styles.css +18 -0
  34. data/lib/boleto_bancario/version.rb +3 -2
  35. data/lib/boleto_bancario.rb +48 -19
  36. data/lib/generators/boleto_bancario/views_generator.rb +47 -0
  37. metadata +140 -106
  38. data/.gitignore +0 -18
  39. data/.rspec +0 -1
  40. data/.rvmrc +0 -1
  41. data/Gemfile +0 -3
  42. data/Planning.markdown +0 -131
  43. data/Rakefile +0 -9
  44. data/TODO.markdown +0 -5
  45. data/boleto_bancario.gemspec +0 -25
  46. data/documentacoes_dos_boletos/Bradesco/Manual_BRADESCO.PDF +0 -0
  47. data/spec/boleto_bancario/calculos/digitos_spec.rb +0 -19
  48. data/spec/boleto_bancario/calculos/fator_vencimento_spec.rb +0 -59
  49. data/spec/boleto_bancario/calculos/fatores_de_multiplicacao_spec.rb +0 -69
  50. data/spec/boleto_bancario/calculos/linha_digitavel_spec.rb +0 -57
  51. data/spec/boleto_bancario/calculos/modulo10_spec.rb +0 -49
  52. data/spec/boleto_bancario/calculos/modulo11_fator_de2a7_spec.rb +0 -43
  53. data/spec/boleto_bancario/calculos/modulo11_fator_de2a9_resto_zero_spec.rb +0 -39
  54. data/spec/boleto_bancario/calculos/modulo11_fator_de2a9_spec.rb +0 -61
  55. data/spec/boleto_bancario/calculos/modulo11_fator_de9a2_resto_x_spec.rb +0 -37
  56. data/spec/boleto_bancario/calculos/modulo11_spec.rb +0 -19
  57. data/spec/boleto_bancario/core/banco_brasil_spec.rb +0 -383
  58. data/spec/boleto_bancario/core/boleto_spec.rb +0 -102
  59. data/spec/boleto_bancario/core/bradesco_spec.rb +0 -170
  60. data/spec/boleto_bancario/core/itau_spec.rb +0 -336
  61. data/spec/boleto_bancario/core/santander_spec.rb +0 -135
  62. data/spec/shared_examples/boleto_bancario_shared_example.rb +0 -164
  63. data/spec/spec_helper.rb +0 -14
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: efcdac3b76956eb5e5cdd9b19f194ce570ddb6a12472af83259106c82adf5515
4
+ data.tar.gz: cf5ad9b16d3c13b899b4c85c88638d30766a2de6f8789bd4448b6f84cc17c4b8
5
+ SHA512:
6
+ metadata.gz: 3bb1fdce229195c7e539cdcd2bbd87b444dbf92b411eba710accb810b470f84f35d3845f99350b6b8b19ab3dcf23aa8a29bd723d66fab56c5fc44b304a81f52e
7
+ data.tar.gz: 18efaffb887487878f9441a4f45cee2cd1e3116b9bbed1f252b9dd6965d142af1de73112ffcc7a772d2420c9a9f06c43279de2ee3f584b4fbb7cfda913091e0e
data/Changelog.markdown CHANGED
@@ -1,6 +1,62 @@
1
- # development
1
+ # 1.0.0
2
+
3
+ ## Breaking Changes
4
+
5
+ * **Ruby 3.3+ required** - Dropped support for Ruby 1.9.x, 2.x, and early 3.x versions
6
+ * **Rails 7.1+ required** - Updated ActiveModel and ActiveSupport to ~> 7.1
7
+ * **RSpec 3.x** - Updated test suite to modern RSpec syntax
8
+ * **Removed HSBC** - HSBC Brazil operations were sold to Bradesco
9
+ * **Removed Banco Real** - Banco Real merged with Santander
10
+
11
+ ## New Features
12
+
13
+ ### New Banks
14
+ * **Nubank** (código 260) - Digital bank support
15
+ * **Banco Inter** (código 077) - Digital bank support
16
+ * **C6 Bank** (código 336) - Digital bank support
17
+
18
+ ### Output Formats
19
+ * **PDF rendering** - Generate boletos as PDF using Prawn
20
+ * **HTML rendering** - Generate boletos as HTML for web display
21
+ * **PNG rendering** - Generate barcode images as PNG
22
+
23
+ ### Internationalization
24
+ * **pt-BR locale** - Added Portuguese (Brazil) translations for all labels and error messages
25
+
26
+ ### Compliance
27
+ * **FEBRABAN 2025** - Updated Fator de Vencimento calculation for the February 22, 2025 transition
28
+ * Old base date: October 7, 1997 (factor 9999 reached on Feb 21, 2025)
29
+ * New base date: May 29, 2022 (factor restarts at 1000 on Feb 22, 2025)
30
+
31
+ ### Utilities
32
+ * **CPF/CNPJ validation** - Added `Documento` class for validating and formatting Brazilian documents
33
+
34
+ ## Improvements
35
+
36
+ * Added `frozen_string_literal: true` pragma to all Ruby files
37
+ * Migrated CI from Travis CI to GitHub Actions
38
+ * Updated all dependencies to modern versions
39
+ * Improved documentation with YARD
40
+
41
+ ## Dependencies
42
+
43
+ * `activesupport` ~> 7.1
44
+ * `activemodel` ~> 7.1
45
+ * `barby` ~> 0.6
46
+ * `prawn` ~> 2.4
47
+ * `prawn-table` ~> 0.2
48
+ * `chunky_png` ~> 1.4
49
+ * `rspec` ~> 3.13 (development)
50
+
51
+ ---
52
+
53
+ # 0.0.2
54
+
55
+ * Implementado Banrisul.
56
+
57
+ # 0.0.1.beta
2
58
 
3
59
  * Implementado Banco do Brasil.
4
60
  * Implementado Santander.
5
61
  * Implementado Bradesco.
6
- * Implementado Itaú.
62
+ * Implementado Itaú.