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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49aca99d2cd2274e30df56f1a0afc5528d9d4f6a
4
- data.tar.gz: b1fbcdee5a277647dacacf4d2c134f9c90c6f866
3
+ metadata.gz: 594f057260fa06d41a94cc732cbf1c63914e4f07
4
+ data.tar.gz: ca4f546b3559443ab5d70a41944b8f566c383678
5
5
  SHA512:
6
- metadata.gz: 96ceffb920279eae6ae83288760f04feaa000fe95a163ed81d09d7de2e9fd5b33f5e5fe0edfa9d1009e184e8a40d44221e16064af96d626fc399a526a5ba32dd
7
- data.tar.gz: 0cffdd6c5dd69bcfc0e0072d9e98c9f4647175a494fb1b24b15287ef3886b802432ba07e3986316b3fa1df7749ae3fa64d41e6a39d01dc8188f74031e8031dd7
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, presence: true, length: { is: self.columns_hash['identification_number'].limit }, format: FORMAT_VALIDATION_REGEX
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 }
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Certificate
3
3
  module China
4
- VERSION = '1.0'.freeze
4
+ VERSION = '1.1'.freeze
5
5
  end
6
6
  end
7
7
  end
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.0'
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-07-21 00:00:00.000000000 Z
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