boletorb 0.0.4 → 0.0.5

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/boletorb.gemspec +1 -1
  3. data/lib/boletorb.rb +3 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 468f41a6e1020d1c867b067958b15a4d362f6a02
4
- data.tar.gz: 43c5a25af6d924b03138fa8d60f5c6a4539633c8
3
+ metadata.gz: 2b18efaf98aa594c90fc673a2cd598bfc1715809
4
+ data.tar.gz: ba507ba6f04b1696208c3e0588c858e73f0f802f
5
5
  SHA512:
6
- metadata.gz: dc05eac3ef4ca958f61bf3f6799eba0a8cb52d8fe13f955a44aa6bc0af48291db60b268b4f6221b7221480274e0ec7f409aba7ecc07f66b9e60daca6839e84c0
7
- data.tar.gz: 5c6f9706198aef98f07611edaab8aae7332527b0aae9462f2969a5d8604642173f4f7a84c3d52667855aba02f47cba034ba019dbec2f8b583bd5a1b3b5561b17
6
+ metadata.gz: 0e40350e63371a2852fde7d15ae17be0a95646856ee9104d30127b8a4497c9eda2bdfc240bd78f79d1f316fffee82f12d04d4f44806147c384a93d9c74ff29a6
7
+ data.tar.gz: b8c0cfa66ce579c561ff446d64537957ee88adfc467ed73ba0cd07f0e6b0f5a9625e6f7ca1d5bc91802f405e3ae4dcb971b1d013c5d845620845d3dc2ecba19b
data/boletorb.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'boletorb'
3
- s.version = '0.0.4'
3
+ s.version = '0.0.5'
4
4
  s.date = '2014-05-23'
5
5
  s.summary = "Boleto RB"
6
6
  s.description = "A gem for generating brazilian 'boletos'"
data/lib/boletorb.rb CHANGED
@@ -82,7 +82,9 @@ module Boletorb
82
82
  def modulo_10(numero)
83
83
  resultado = multiplicacoes_modulo_10(numero)
84
84
  soma = resultado.inject(:+)
85
- 10 - (soma % 10)
85
+ modulo = 10 - (soma % 10)
86
+ return 0 if modulo == 10
87
+ modulo
86
88
  end
87
89
 
88
90
  def multiplicacoes_modulo_11(num)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boletorb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filipe Monteiro