digit_checksum 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7758954adbce872ca492737d6848987a4e0c3e4
4
- data.tar.gz: 656edafd10e3c9c70658cfa7ee2fae30072a3c7e
3
+ metadata.gz: a7f4912919208a9c69e0dab3f129212f0927928d
4
+ data.tar.gz: 7cb2b0ac8b917455439bb5475ae3fb9249ac0205
5
5
  SHA512:
6
- metadata.gz: fd65ebf917f946649b808035ef6db3949114c998bca7b81e0a53f9e917bd50aec6e90aa5217179143677c721faab6f0f9094445bad8840a7a7e415c719a9ea01
7
- data.tar.gz: 3125454badcd0a2773719736d3b638c4fa1e9061c270936f9af8a2baef1a8a9b90e2eb70bcdbaecf292ba992c26a64ce86f5e49691546da623eb3da2534ece1e
6
+ metadata.gz: 6bbfc32f461e5825cbadedb461355da5328cae98fcf060e0b6e5aafcd2e97e11116bd90c1b3b71d4ee92169fe977cf2d2f62ce9918715d138b2ef38bbe625fc1
7
+ data.tar.gz: 70da514b2ca242306e9ce3d049d90fcb1808b5b27b73cf54fb11aea7ee8022a31ee207c795bce43f7b23ad3e8e171b8f1f2bbad125a7f5419e8f9a88bf941bd8
data/README.md CHANGED
@@ -17,7 +17,7 @@ One of the greatest abilitys of this library is allowing to check digit checksum
17
17
  Add this line to your application's Gemfile:
18
18
 
19
19
  ```ruby
20
- gem 'digit_checksum', '~> 0.2.0'
20
+ gem 'digit_checksum', '~> 0.2.1'
21
21
  ```
22
22
 
23
23
  And then execute:
@@ -37,8 +37,8 @@ module DigitChecksum
37
37
  end
38
38
 
39
39
  def valid?(document_number)
40
- # remove all non digits and return an array to be matched with mask
41
- normalized_document = normalize_document_number(document_number)
40
+ # remove all non digits and return an string to be matched with mask
41
+ normalized_document = normalize_number_to_s(document_number)
42
42
 
43
43
  # if document is empty
44
44
  return false if normalized_document.nil? || normalized_document.empty?
@@ -56,7 +56,7 @@ module DigitChecksum
56
56
  end
57
57
 
58
58
  def remove_verify_digits!(document_number)
59
- document_number.to_s.gsub!(get_clear_number_regexp, '')
59
+ document_number.gsub!(get_clear_number_regexp, '')
60
60
 
61
61
  obtain_verify_digits_positions.each_with_index.flat_map {|position, index|
62
62
  document_number.slice!((position - index), 1)
@@ -1,3 +1,3 @@
1
1
  module DigitChecksum
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digit_checksum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Fidelis