unidom-certificate-china 0.7 → 1.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
2
  SHA1:
3
- metadata.gz: 161215b5e3bfb45295f5a625c528b798fa102f89
4
- data.tar.gz: 689f3e4109029a382520f23b819d875122546354
3
+ metadata.gz: 49aca99d2cd2274e30df56f1a0afc5528d9d4f6a
4
+ data.tar.gz: b1fbcdee5a277647dacacf4d2c134f9c90c6f866
5
5
  SHA512:
6
- metadata.gz: 618e476067fa11631237761d73eb59cc3820b7ab6fd9a892fad2327db6294f938efecce8f2455413a24de4a4610110bf88b92467248f000735ef95cdc6942b59
7
- data.tar.gz: 51b2d3dea0edeefd8c7d99aaa3d87636ee8c4878101186e239e7609108f8765833b9413bc203bb3f9593fb301d4c33e270901f1fc9893ec8a2580f69528fc6be
6
+ metadata.gz: 96ceffb920279eae6ae83288760f04feaa000fe95a163ed81d09d7de2e9fd5b33f5e5fe0edfa9d1009e184e8a40d44221e16064af96d626fc399a526a5ba32dd
7
+ data.tar.gz: 0cffdd6c5dd69bcfc0e0072d9e98c9f4647175a494fb1b24b15287ef3886b802432ba07e3986316b3fa1df7749ae3fa64d41e6a39d01dc8188f74031e8031dd7
@@ -10,4 +10,4 @@
10
10
  // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require_tree .
13
+ //= require_self
@@ -10,6 +10,5 @@
10
10
  * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
11
  * file per style scope.
12
12
  *
13
- *= require_tree .
14
13
  *= require_self
15
14
  */
@@ -7,6 +7,7 @@ class Unidom::Certificate::China::BusinessLicense < ActiveRecord::Base
7
7
  self.table_name = 'unidom_china_business_licenses'
8
8
 
9
9
  include Unidom::Common::Concerns::ModelExtension
10
+ include Unidom::Certificate::Concerns::AsCertification
10
11
 
11
12
  validates :registration_number, presence: true, length: { is: columns_hash['registration_number'].limit }, numericality: { integer_only: true }, format: self::FORMAT_VALIDATION_REGEX
12
13
 
@@ -16,8 +17,6 @@ class Unidom::Certificate::China::BusinessLicense < ActiveRecord::Base
16
17
  validates :legal_representative_name, presence: true, length: { in: 2..columns_hash['legal_representative_name'].limit }
17
18
  validates :issuing_authority_name, allow_blank: true, length: { in: 2..columns_hash['issuing_authority_name'].limit }
18
19
 
19
- has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certification
20
-
21
20
  scope :registration_number_is, ->(registration_number) { where registration_number: registration_number }
22
21
 
23
22
  end
@@ -0,0 +1,13 @@
1
+ module Unidom::Certificate::China::Concerns::AsBusinessLicenseCertificated
2
+
3
+ extend ActiveSupport::Concern
4
+
5
+ include Unidom::Certificate::Concerns::AsCertificated
6
+
7
+ self.included do |includer|
8
+
9
+ has_many :china_business_licenses, through: :certificatings, source: :certification, source_type: 'Unidom::Certificate::China::BusinessLicense'
10
+
11
+ end
12
+
13
+ end
@@ -0,0 +1,13 @@
1
+ module Unidom::Certificate::China::Concerns::AsIdentityCardCertificated
2
+
3
+ extend ActiveSupport::Concern
4
+
5
+ include Unidom::Certificate::Concerns::AsCertificated
6
+
7
+ self.included do |includer|
8
+
9
+ has_many :china_identity_cards, through: :certificatings, source: :certification, source_type: 'Unidom::Certificate::China::IdentityCard'
10
+
11
+ end
12
+
13
+ end
@@ -7,6 +7,7 @@ class Unidom::Certificate::China::IdentityCard < ActiveRecord::Base
7
7
  self.table_name = 'unidom_china_identity_cards'
8
8
 
9
9
  include Unidom::Common::Concerns::ModelExtension
10
+ include Unidom::Certificate::Concerns::AsCertification
10
11
 
11
12
  validates :identification_number, presence: true, length: { is: self.columns_hash['identification_number'].limit }, format: FORMAT_VALIDATION_REGEX
12
13
 
@@ -15,8 +16,6 @@ class Unidom::Certificate::China::IdentityCard < ActiveRecord::Base
15
16
 
16
17
  validates :issuing_authority_name, allow_blank: true, length: { in: 2..self.columns_hash['issuing_authority_name'].limit }
17
18
 
18
- has_many :certificatings, class_name: 'Unidom::Certificate::Certificating', as: :certification
19
-
20
19
  scope :identification_number_is, ->(identification_number) { where identification_number: identification_number }
21
20
 
22
21
  before_validation do
@@ -3,12 +3,13 @@
3
3
  <head>
4
4
  <title>China</title>
5
5
  <%= stylesheet_link_tag "china/application", media: "all" %>
6
- <%= javascript_include_tag "china/application" %>
7
6
  <%= csrf_meta_tags %>
8
7
  </head>
9
8
  <body>
10
9
 
11
10
  <%= yield %>
12
11
 
12
+ <%= javascript_include_tag 'china/application' %>
13
+
13
14
  </body>
14
15
  </html>
@@ -19,8 +19,6 @@ class CreateUnidomChinaIdentityCards < ActiveRecord::Migration
19
19
  t.date :validity_from_date, null: false, default: '1970-01-01'
20
20
  t.date :validity_thru_date, null: false, default: '3000-01-01'
21
21
 
22
- # t.string :slug, null: false, default: nil, limit: 200
23
-
24
22
  t.column :state, 'char(1)', null: false, default: 'C'
25
23
  t.datetime :opened_at, null: false, default: ::Time.utc(1970)
26
24
  t.datetime :closed_at, null: false, default: ::Time.utc(3000)
@@ -33,7 +31,6 @@ class CreateUnidomChinaIdentityCards < ActiveRecord::Migration
33
31
 
34
32
  add_index :unidom_china_identity_cards, [ :identification_number, :validity_from_date ], unique: true, name: 'index_unidom_china_identity_cards_on_identification_number'
35
33
  # add_index :unidom_china_identity_cards, :encrypted_identification_number
36
- # add_index :unidom_china_identity_cards, :slug, unique: true
37
34
 
38
35
  end
39
36
 
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Certificate
3
3
  module China
4
- VERSION = '0.7'.freeze
4
+ VERSION = '1.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: '0.7'
4
+ version: '1.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: 2016-04-20 00:00:00.000000000 Z
11
+ date: 2016-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.8'
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
- version: '0.8'
26
+ version: '0.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: unidom-certificate
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
27
41
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
28
42
  The China Certificate domain model engine includes Identity Card, Driving License,
29
43
  and Business License models. Unidom (统一领域对象模型)是一系列的领域模型引擎。中国证件领域模型引擎包括中国大陆的身份证、驾驶证、营业执照等模型。
@@ -41,6 +55,8 @@ files:
41
55
  - app/controllers/unidom/certificate/china/application_controller.rb
42
56
  - app/helpers/unidom/certificate/china/application_helper.rb
43
57
  - app/models/unidom/certificate/china/business_license.rb
58
+ - app/models/unidom/certificate/china/concerns/as_business_license_certificated.rb
59
+ - app/models/unidom/certificate/china/concerns/as_identity_card_certificated.rb
44
60
  - app/models/unidom/certificate/china/identity_card.rb
45
61
  - app/views/layouts/unidom/certificate/china/application.html.erb
46
62
  - config/routes.rb
@@ -70,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
86
  version: '0'
71
87
  requirements: []
72
88
  rubyforge_project:
73
- rubygems_version: 2.4.5.1
89
+ rubygems_version: 2.6.4
74
90
  signing_key:
75
91
  specification_version: 4
76
92
  summary: Unidom China Certificate Domain Model Engine 中国证件领域模型引擎