unidom-certificate-china 1.5.6 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/rspec/models/unidom/certificate/china/business_license_shared_examples.rb +15 -0
- data/lib/rspec/models/unidom/certificate/china/business_license_spec.rb +3 -4
- data/lib/rspec/models/unidom/certificate/china/identity_card_shared_examples.rb +15 -0
- data/lib/rspec/models/unidom/certificate/china/identity_card_spec.rb +1 -2
- data/lib/unidom/certificate/china/rspec_shared_examples.rb +2 -0
- data/lib/unidom/certificate/china/version.rb +1 -1
- metadata +8 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ece8860f89f981afb834b08c78c9b9fe143d3aee0d2145a0e2d33d656ff749cf
|
4
|
+
data.tar.gz: 7d91c713505fce9579209ce47e8af855212c32d2988ad2ead50be2769b1323bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3fe17a4ab77348363ddcb2676c8414b31e0175b267caf7eee370e317a861ebc79fa16f74b9082a885bb927423666e008db6c1c6ea685d4c5448b184331ade00
|
7
|
+
data.tar.gz: e424dbb65a8009fb735385acd20779600d219b0c80003068e737a35fd9862a4ca21c2b83308c4d103d6e8aa8665a6b3b5802e6f9162611500813dbf4ff917d5e
|
@@ -0,0 +1,15 @@
|
|
1
|
+
shared_examples 'Unidom::Certificate::China::BusinessLicense' do |model_attributes, model, certificated, certificator|
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
it_behaves_like 'Unidom::Certificate::Concerns::AsCertification', model_attributes, model, certificated, certificator
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -19,11 +19,10 @@ describe Unidom::Certificate::China::BusinessLicense, type: :model do
|
|
19
19
|
validity_thru_date: Date.current+10.years
|
20
20
|
}
|
21
21
|
|
22
|
-
it_behaves_like 'Unidom::Common::Concerns::ModelExtension',
|
23
|
-
it_behaves_like 'Unidom::Certificate::Concerns::AsCertification', model_attributes
|
22
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
24
23
|
|
25
24
|
registration_number_max_length = described_class.columns_hash['registration_number'].limit
|
26
|
-
it_behaves_like 'validates', model_attributes, :registration_number,
|
25
|
+
it_behaves_like 'validates', model_attributes.merge(unified_social_credit_identifier: '112233445566778898'), :registration_number,
|
27
26
|
{ } => 0,
|
28
27
|
{ registration_number: nil } => 0,
|
29
28
|
{ registration_number: '' } => 0,
|
@@ -41,7 +40,7 @@ describe Unidom::Certificate::China::BusinessLicense, type: :model do
|
|
41
40
|
{ registration_number: 'A'*(registration_number_max_length+1) } => 3
|
42
41
|
|
43
42
|
unified_social_credit_identifier_max_length = described_class.columns_hash['unified_social_credit_identifier'].limit
|
44
|
-
it_behaves_like 'validates', model_attributes, :unified_social_credit_identifier,
|
43
|
+
it_behaves_like 'validates', model_attributes.merge(unified_social_credit_identifier: '112233445566778897'), :unified_social_credit_identifier,
|
45
44
|
{ } => 0,
|
46
45
|
{ unified_social_credit_identifier: nil } => 0,
|
47
46
|
{ unified_social_credit_identifier: '' } => 0,
|
@@ -0,0 +1,15 @@
|
|
1
|
+
shared_examples 'Unidom::Certificate::China::IdentityCard' do |model_attributes, model, certificated, certificator|
|
2
|
+
|
3
|
+
before :each do
|
4
|
+
end
|
5
|
+
|
6
|
+
after :each do
|
7
|
+
end
|
8
|
+
|
9
|
+
context do
|
10
|
+
|
11
|
+
it_behaves_like 'Unidom::Certificate::Concerns::AsCertification', model_attributes, model, certificated, certificator
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -20,8 +20,7 @@ describe Unidom::Certificate::China::IdentityCard, type: :model do
|
|
20
20
|
validity_thru_date: Date.current+10.years
|
21
21
|
}
|
22
22
|
|
23
|
-
it_behaves_like 'Unidom::Common::Concerns::ModelExtension',
|
24
|
-
it_behaves_like 'Unidom::Certificate::Concerns::AsCertification', model_attributes
|
23
|
+
it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
|
25
24
|
|
26
25
|
identification_number_max_length = described_class.columns_hash['identification_number'].limit
|
27
26
|
it_behaves_like 'validates', model_attributes, :identification_number,
|
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:
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-certificate
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 2.1.1
|
19
|
+
version: '3.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 2.1.1
|
26
|
+
version: '3.0'
|
33
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
34
28
|
The China Certificate domain model engine includes Identity Card, Driving License,
|
35
29
|
and Business License models. Unidom (统一领域对象模型)是一系列的领域模型引擎。中国证件领域模型引擎包括中国大陆的身份证、驾驶证、营业执照等模型。
|
@@ -61,7 +55,9 @@ files:
|
|
61
55
|
- db/migrate/20010291560010_create_unidom_china_identity_cards.rb
|
62
56
|
- db/migrate/20010291560110_create_unidom_china_business_licenses.rb
|
63
57
|
- db/migrate/20010291560111_add_unified_social_credit_identifier_to_business_licenses.rb
|
58
|
+
- lib/rspec/models/unidom/certificate/china/business_license_shared_examples.rb
|
64
59
|
- lib/rspec/models/unidom/certificate/china/business_license_spec.rb
|
60
|
+
- lib/rspec/models/unidom/certificate/china/identity_card_shared_examples.rb
|
65
61
|
- lib/rspec/models/unidom/certificate/china/identity_card_spec.rb
|
66
62
|
- lib/rspec/validators/unidom/certificate/china/identification_number_validator_spec.rb
|
67
63
|
- lib/rspec/validators/unidom/certificate/china/unified_social_credit_identifier_validator_spec.rb
|
@@ -69,6 +65,7 @@ files:
|
|
69
65
|
- lib/unidom/certificate/china.rb
|
70
66
|
- lib/unidom/certificate/china/engine.rb
|
71
67
|
- lib/unidom/certificate/china/models_rspec.rb
|
68
|
+
- lib/unidom/certificate/china/rspec_shared_examples.rb
|
72
69
|
- lib/unidom/certificate/china/types_rspec.rb
|
73
70
|
- lib/unidom/certificate/china/validators_rspec.rb
|
74
71
|
- lib/unidom/certificate/china/version.rb
|
@@ -91,8 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
88
|
- !ruby/object:Gem::Version
|
92
89
|
version: '0'
|
93
90
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.4
|
91
|
+
rubygems_version: 3.1.2
|
96
92
|
signing_key:
|
97
93
|
specification_version: 4
|
98
94
|
summary: Unidom China Certificate Domain Model Engine 中国证件领域模型引擎
|