br_documents 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac405ceecbb3815bf47f64f9e72a5c879668e810
4
- data.tar.gz: dba3e8eed8d0799421ba07870157cdf39dabfe74
3
+ metadata.gz: af282960d7eec2aace8577ece140037ae92bccc7
4
+ data.tar.gz: 6a0949192d3fa4e7629b3616607a4ce1a7fa69d6
5
5
  SHA512:
6
- metadata.gz: 1c31e91f3559a125a625df02fb4b2f7ae81bd404c5fb565c5d50dc588efc30aaefb08a9756fd424ebb79f691b3a397f75705a7b60b51d483fc0a49cf12961770
7
- data.tar.gz: 16504c4a406c49fc0eced2158fd5e9c6a43084428eeab94e3cc93ecfb8e9099fbc1f3773dc34d91c286c9da4a62345ac1389f7c236840d86e945eb8ef3bfeb07
6
+ metadata.gz: faae22eac35ea67c6c76d94987fbf4202d50e7dbb97b08d871f8284a5da121c79636aed37e61f275bcabfe91f8fa6aff248536556c343e55687368494b3ef4aa
7
+ data.tar.gz: 5ee7e4460d07128179bff951441ca1cb7ab8b214187ca1122e846d72303d84bac591c54af2514374682b86e4df0e558a55fe72db4f1a52035c52881e6b32b949
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- br_documents (0.1.0)
4
+ br_documents (0.1.1)
5
5
  activemodel (>= 4.0.0)
6
6
  i18n (>= 0.6.5)
7
7
 
@@ -22,7 +22,7 @@ module BrDocuments
22
22
  (i + 1).even? ? (even += number.to_i) : (odd += number.to_i * 3)
23
23
  end
24
24
 
25
- @code.chars.last.to_i == (10 - (odd + even) % 10)
25
+ @code.chars.last.to_i == ((10 - (odd + even)) % 10)
26
26
  end
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module BrDocuments
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -27,6 +27,12 @@ describe BrDocuments::Gtin do
27
27
  it { is_expected.to be_valid }
28
28
  end
29
29
 
30
+ context 'when the final digit is zero' do
31
+ subject { described_class.new('7898417964120') }
32
+
33
+ it { is_expected.to be_valid }
34
+ end
35
+
30
36
  context 'when the number of digits is different of 8, 13 or 14' do
31
37
  subject { described_class.new('12345678901234560') }
32
38
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_documents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ASSEINFO - Sistemas de Informação
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-06 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel