unidom-certificate-china 1.5.1 → 1.5.2

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: 6378b2cc06ef41f320aba919c364bc2a0421f600
4
- data.tar.gz: 808de7c1b9343e0dbc1357806cfb5d4bb371a711
3
+ metadata.gz: 7d7c9110d9582536eebe5bcca2fc87595c751d7b
4
+ data.tar.gz: 1207af8a55229f248d962952b26a12f69bbb5118
5
5
  SHA512:
6
- metadata.gz: aef1aaca4f8b14fe7ae71599b2c43f2a63f06f3a407215e73278b8b09daf509885415b1ef9de53b9ecc6c08c0386d8ea2fa9876ceedeb0416df7b3184c2c5891
7
- data.tar.gz: 67a071a7c388e40a46ee1ba72ae5648658f57dd1073756973cfc5bbf74b8c2dac29c3d408f3d087cbf88219a27baaf730a7903446e32c1d57705e5cf6352df19
6
+ metadata.gz: ad1f70bcc72febbc3ec67354377f9703d20406185ce5f28c0f0c3be6d4dcbd6c4f3bfa0b2abe2dcb8227bc5446f45b72c3759476304962e458b181fd4387608b
7
+ data.tar.gz: 7749431ae2b71eb3411c8a49864486607fae8169da7f031c8b32d778aa6a194cde0ead51735c21bcdead134ad867c92e7237f63dd145f1bc3b6ebbfff106c1f9
@@ -0,0 +1,20 @@
1
+ RSpec.describe Unidom::Certificate::China::IdentificationNumberValidator, type: :validator do
2
+
3
+ valid_values = %w{
4
+ 231024198506186916
5
+ 231024198506188110
6
+ 231024198506185470
7
+ 231024198506182851
8
+ 231024198506187193
9
+ }
10
+ invalid_values = %w{
11
+ 231024198506186917
12
+ 231024198506188111
13
+ 231024198506185471
14
+ 231024198506182852
15
+ 231024198506187194
16
+ }
17
+
18
+ it_behaves_like 'ActiveModel::EachValidator', valid_values, invalid_values
19
+
20
+ end
@@ -0,0 +1,22 @@
1
+ RSpec.describe Unidom::Certificate::China::UnifiedSocialCreditIdentifierValidator, type: :validator do
2
+
3
+ valid_values = %w{
4
+ 91350100M000100Y43
5
+ 914405073041792819
6
+ 91320111780685310N
7
+ 91441900073549790Q
8
+ 913201176673804782
9
+ 913504811581992673
10
+ }
11
+ invalid_values = %w{
12
+ 91350100M000100Y44
13
+ 91440507304179281A
14
+ 91320111780685310P
15
+ 91441900073549790R
16
+ 913201176673804783
17
+ 913504811581992674
18
+ }
19
+
20
+ it_behaves_like 'ActiveModel::EachValidator', valid_values, invalid_values
21
+
22
+ end
@@ -0,0 +1,2 @@
1
+ require 'rspec/validators/unidom/certificate/china/identification_number_validator_spec'
2
+ require 'rspec/validators/unidom/certificate/china/unified_social_credit_identifier_validator_spec'
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Certificate
3
3
  module China
4
- VERSION = '1.5.1'.freeze
4
+ VERSION = '1.5.2'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-certificate-china
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-07 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-certificate
@@ -63,6 +63,8 @@ files:
63
63
  - db/migrate/20010291560111_add_unified_social_credit_identifier_to_business_licenses.rb
64
64
  - lib/rspec/models/unidom/certificate/china/business_license_spec.rb
65
65
  - lib/rspec/models/unidom/certificate/china/identity_card_spec.rb
66
+ - lib/rspec/validators/unidom/certificate/china/identification_number_validator_spec.rb
67
+ - lib/rspec/validators/unidom/certificate/china/unified_social_credit_identifier_validator_spec.rb
66
68
  - lib/tasks/data_tasks.rake
67
69
  - lib/unidom/certificate/china.rb
68
70
  - lib/unidom/certificate/china/engine.rb