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 +4 -4
- data/lib/rspec/validators/unidom/certificate/china/identification_number_validator_spec.rb +20 -0
- data/lib/rspec/validators/unidom/certificate/china/unified_social_credit_identifier_validator_spec.rb +22 -0
- data/lib/unidom/certificate/china/validators_rspec.rb +2 -0
- data/lib/unidom/certificate/china/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d7c9110d9582536eebe5bcca2fc87595c751d7b
|
4
|
+
data.tar.gz: 1207af8a55229f248d962952b26a12f69bbb5118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
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
|