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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bd40eca1d2c8f9cb7effb205c2711d3a93d4e5f2
4
- data.tar.gz: 29f80e90b8591cc4c9a44b46bc18ee648e70fa9d
2
+ SHA256:
3
+ metadata.gz: ece8860f89f981afb834b08c78c9b9fe143d3aee0d2145a0e2d33d656ff749cf
4
+ data.tar.gz: 7d91c713505fce9579209ce47e8af855212c32d2988ad2ead50be2769b1323bb
5
5
  SHA512:
6
- metadata.gz: '09670673ba0ef1dc236aeb1b8f1ead202175b2c822f6db6813941f5b45acba12e577401795702e09fc1a246829377d0e4c2155dbc3b36a4eb3250f05c01d3376'
7
- data.tar.gz: 0efd51e05c151e6273a289516ca2e75dbe74a2a1328da13f60f8814d59c84e651f22807ad712ea4dda4fbaf4dad8523e524dbbd2148d2b69fc777e1af7cd93fe
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', model_attributes
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', model_attributes
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,
@@ -0,0 +1,2 @@
1
+ require 'rspec/models/unidom/certificate/china/business_license_shared_examples'
2
+ require 'rspec/models/unidom/certificate/china/identity_card_shared_examples'
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Certificate
3
3
  module China
4
- VERSION = '1.5.6'.freeze
4
+ VERSION = '2.0'.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.6
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: 2017-03-31 00:00:00.000000000 Z
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: '2.1'
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: '2.1'
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
- rubyforge_project:
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 中国证件领域模型引擎