unidom-certificate 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +4 -0
- data/Rakefile +24 -0
- data/app/assets/javascripts/unidom/certificate/application.js +13 -0
- data/app/assets/stylesheets/unidom/certificate/application.css +15 -0
- data/app/controllers/unidom/certificate/application_controller.rb +2 -0
- data/app/helpers/unidom/certificate/application_helper.rb +2 -0
- data/app/views/layouts/unidom/certificate/application.html.erb +14 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20010201000000_create_unidom_china_identity_cards.rb +40 -0
- data/lib/tasks/certificate_tasks.rake +4 -0
- data/lib/unidom/certificate/engine.rb +15 -0
- data/lib/unidom/certificate/version.rb +5 -0
- data/lib/unidom/certificate.rb +6 -0
- metadata +89 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5f918071a5d2fe7a984aafae444cdb6509392aa8
|
4
|
+
data.tar.gz: 6cb7e2cf87c6b3f088d9bb48bef743532c307612
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a7ac6c39e79950385d4d987929a8981e984b02c133130220930f457fa10e4a35cdd73a1eb6144626522aabc4cc6ed0050d35deaab0b3da255176d644aa1fb579
|
7
|
+
data.tar.gz: b6d1657077ef039169a9ec1fdad3828fe13b401aafc47740f0200e759f65d247b4c24384637727ed813318da313569065bf15708b70c3bc34c46972d7d83c2cf
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2015 Topbit Du
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Unidom Certificate'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
load 'rails/tasks/statistics.rake'
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
Bundler::GemHelper.install_tasks
|
24
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Unidom Certificate</title>
|
5
|
+
<%= stylesheet_link_tag 'unidom/certificate/application', media: 'all' %>
|
6
|
+
<%= javascript_include_tag 'unidom/certificate/application' %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
class CreateUnidomChinaIdentityCards < ActiveRecord::Migration
|
2
|
+
|
3
|
+
def change
|
4
|
+
|
5
|
+
create_table :unidom_china_identity_cards, id: :uuid do |t|
|
6
|
+
|
7
|
+
t.string :name, null: false, default: '', limit: 16
|
8
|
+
t.date :birth_date, null: false, default: nil
|
9
|
+
t.string :address, null: false, default: '', limit: 200
|
10
|
+
|
11
|
+
t.column :gender_code, 'char(1)', null: false, default: '0'
|
12
|
+
t.column :ethnicity_code, 'char(2)', null: false, default: 'HA'
|
13
|
+
t.column :identification_number, 'char(18)', null: false, default: nil
|
14
|
+
|
15
|
+
# t.column :encrypted_identification_number, 'char(45)', null: false, default: nil
|
16
|
+
# t.column :encryption_pepper, 'char(21)', null: false, default: nil
|
17
|
+
|
18
|
+
t.string :issuing_authority_name, null: false, default: '', limit: 200
|
19
|
+
t.date :validity_from_date, null: false, default: '2005-01-01'
|
20
|
+
t.date :validity_thru_date, null: false, default: '2025-01-01'
|
21
|
+
|
22
|
+
# t.string :slug, null: false, default: nil, limit: 200
|
23
|
+
|
24
|
+
t.column :state, 'char(1)', null: false, default: 'C'
|
25
|
+
t.datetime :opened_at, null: false, default: ::Time.utc(1970)
|
26
|
+
t.datetime :closed_at, null: false, default: ::Time.utc(3000)
|
27
|
+
t.boolean :defunct, null: false, default: false
|
28
|
+
t.jsonb :notation, null: false, default: {}
|
29
|
+
|
30
|
+
t.timestamps null: false
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
add_index :unidom_china_identity_cards, :identification_number
|
35
|
+
# add_index :unidom_china_identity_cards, :encrypted_identification_number
|
36
|
+
# add_index :unidom_china_identity_cards, :slug, unique: true
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Unidom
|
2
|
+
module Certificate
|
3
|
+
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
|
6
|
+
isolate_namespace ::Unidom::Certificate
|
7
|
+
|
8
|
+
initializer :append_migrations do |app|
|
9
|
+
config.paths['db/migrate'].expanded.each { |expanded_path| app.config.paths['db/migrate'] << expanded_path } unless app.root.to_s.match root.to_s
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: unidom-certificate
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Topbit Du
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pg
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
42
|
+
The Certificate domain model engine includes Identity Card and Business License
|
43
|
+
models. Unidom (统一领域对象模型)是一系列的领域模型引擎。证书领域模型引擎包括身份证和营业执照的模型。
|
44
|
+
email:
|
45
|
+
- topbit.du@gmail.com
|
46
|
+
executables: []
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- MIT-LICENSE
|
51
|
+
- README.rdoc
|
52
|
+
- Rakefile
|
53
|
+
- app/assets/javascripts/unidom/certificate/application.js
|
54
|
+
- app/assets/stylesheets/unidom/certificate/application.css
|
55
|
+
- app/controllers/unidom/certificate/application_controller.rb
|
56
|
+
- app/helpers/unidom/certificate/application_helper.rb
|
57
|
+
- app/views/layouts/unidom/certificate/application.html.erb
|
58
|
+
- config/routes.rb
|
59
|
+
- db/migrate/20010201000000_create_unidom_china_identity_cards.rb
|
60
|
+
- lib/tasks/certificate_tasks.rake
|
61
|
+
- lib/unidom/certificate.rb
|
62
|
+
- lib/unidom/certificate/engine.rb
|
63
|
+
- lib/unidom/certificate/version.rb
|
64
|
+
homepage: https://github.com/topbitdu/unidom-certificate
|
65
|
+
licenses:
|
66
|
+
- MIT
|
67
|
+
metadata: {}
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 2.4.7
|
85
|
+
signing_key:
|
86
|
+
specification_version: 4
|
87
|
+
summary: The Certificate domain model engine includes Identity Card and Business License
|
88
|
+
models.
|
89
|
+
test_files: []
|