unidom-certificate-china 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/app/models/unidom/certificate/china/identity_card.rb +1 -1
- data/lib/unidom/certificate/china/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 594f057260fa06d41a94cc732cbf1c63914e4f07
|
4
|
+
data.tar.gz: ca4f546b3559443ab5d70a41944b8f566c383678
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcf88d83f56ffdb5bb8c6e84ad3bd5f3ae03aefbb33fb5b391072683ce49050fdc01335787969c0254517fb29bc4c14c8e7dbb5320a56118e224029c88f8d237
|
7
|
+
data.tar.gz: 2f3c4b84c36cda0f9f9f4752d634690d424545b43157ce3088cad623a58766ac466e20e4477fdb61f149521ed9cd918e805bab7c58fd9b393db2fff4f7ecd2db
|
data/README.md
CHANGED
@@ -43,3 +43,19 @@ Unidom::Certificate::China::BusinessLicense.registration_number_is('510105012345
|
|
43
43
|
validity_thru_date: '2025-01-01'
|
44
44
|
)
|
45
45
|
```
|
46
|
+
|
47
|
+
## Include the Concerns
|
48
|
+
```ruby
|
49
|
+
include Unidom::Certificate::China::Concerns::AsBusinessLicenseCertificated
|
50
|
+
include Unidom::Certificate::China::Concerns::AsIdentityCardCertificated
|
51
|
+
```
|
52
|
+
|
53
|
+
### As Business License Certificated
|
54
|
+
The As Business License Certificated do the following tasks for the includer automatically:
|
55
|
+
1. Include the [As Certificated](http://https://github.com/topbitdu/unidom-certificated) concern
|
56
|
+
2. Define the has_many :china_business_licenses macro as: ``has_many :china_business_licenses, through: :certificatings, source: :certification, source_type: 'Unidom::Certificate::China::BusinessLicense'``
|
57
|
+
|
58
|
+
### As Identity Card Certificated
|
59
|
+
The As Identity Card Certificated do the following tasks for the includer automatically:
|
60
|
+
1. Include the [As Certificated](http://https://github.com/topbitdu/unidom-certificated) concern
|
61
|
+
2. Define the has_many :china_identity_cards macro as: ``has_many :china_identity_cards, through: :certificatings, source: :certification, source_type: 'Unidom::Certificate::China::IdentityCard'``
|
@@ -9,7 +9,7 @@ class Unidom::Certificate::China::IdentityCard < ActiveRecord::Base
|
|
9
9
|
include Unidom::Common::Concerns::ModelExtension
|
10
10
|
include Unidom::Certificate::Concerns::AsCertification
|
11
11
|
|
12
|
-
validates :identification_number,
|
12
|
+
validates :identification_number, presence: true, length: { is: self.columns_hash['identification_number'].limit }, format: FORMAT_VALIDATION_REGEX
|
13
13
|
|
14
14
|
validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }
|
15
15
|
validates :address, presence: true, length: { in: 2..self.columns_hash['address'].limit }
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-certificate-china
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.9'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|