unidom-contact-china 1.0 → 1.0.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 +18 -2
- data/Rakefile +2 -2
- data/app/assets/config/unidom-contact-china_manifest.js +2 -0
- data/app/assets/javascripts/unidom/contact/china/application.js +1 -1
- data/app/assets/stylesheets/unidom/contact/china/application.css +3 -3
- data/app/controllers/unidom/contact/china/application_controller.rb +1 -0
- data/app/jobs/unidom/contact/china/application_job.rb +2 -0
- data/app/mailers/unidom/contact/china/application_mailer.rb +4 -0
- data/app/models/unidom/contact/china/application_record.rb +3 -0
- data/app/models/unidom/contact/china/mobile_phone_number.rb +1 -1
- data/app/views/layouts/unidom/contact/china/application.html.erb +1 -1
- data/lib/unidom/contact/china/version.rb +1 -1
- metadata +8 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46d0beca414b04af04c8ed05236b46add1461af5
|
4
|
+
data.tar.gz: 82f78bf53a34c7f8867c33f85616fd2d23ef2ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86b552f71bed0785a8b995b29a0cb7ecfaf62e0a228963a36ca943670f50009520e0c88b2fa2fad8ddac6c674ac37b53543f889935173e9ea47a4bc9f5de373a
|
7
|
+
data.tar.gz: 24ccd84b63aa7e89c0c410a6290c1e5cc131b275aa3280139a7290833c9248b147da309360055d5aa5a0920fe1167d080e8b6d0bf2ce6b320fa01250703c515d
|
data/README.md
CHANGED
@@ -2,26 +2,39 @@
|
|
2
2
|
|
3
3
|
[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/unidom-contact-china.svg)](https://badge.fury.io/rb/unidom-contact-china)
|
5
|
+
[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-contact-china.svg)](https://gemnasium.com/github.com/topbitdu/unidom-contact-china)
|
5
6
|
|
6
7
|
Unidom (UNIfied Domain Object Model) is a series of domain model engines. The China Contact domain model engine includes China Mobile Phone Number and its relative models.
|
7
8
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。中国行政区划领域模型引擎包括中国大陆的手机号码及其相关的模型。
|
8
9
|
|
10
|
+
|
11
|
+
|
9
12
|
## Recent Update
|
13
|
+
|
10
14
|
Check out the [Road Map](ROADMAP.md) to find out what's the next.
|
11
15
|
Check out the [Change Log](CHANGELOG.md) to find out what's new.
|
12
16
|
|
17
|
+
|
18
|
+
|
13
19
|
## Usage in Gemfile
|
20
|
+
|
14
21
|
```ruby
|
15
22
|
gem 'unidom-contact-china'
|
16
23
|
```
|
17
24
|
|
25
|
+
|
26
|
+
|
18
27
|
## Run the Database Migration
|
28
|
+
|
19
29
|
```shell
|
20
30
|
rake db:migrate
|
21
31
|
```
|
22
32
|
The migration versions start with 2001039156.
|
23
33
|
|
34
|
+
|
35
|
+
|
24
36
|
## Call the Model
|
37
|
+
|
25
38
|
```ruby
|
26
39
|
phone_number = Unidom::Contact::China::MobilePhoneNumber.new phone_number: '13912345678'
|
27
40
|
phone_number.save!
|
@@ -29,12 +42,15 @@ phone_number.save!
|
|
29
42
|
Unidom::Contact::China::MobilePhoneNumber.valid_at.alive.first # Get all active China mobile phone numbers
|
30
43
|
```
|
31
44
|
|
45
|
+
|
46
|
+
|
32
47
|
## Include the Concerns
|
48
|
+
|
33
49
|
```ruby
|
34
|
-
include Unidom::Contact::Concerns::
|
35
|
-
include Unidom::Contact::Concerns::AsSubscriber
|
50
|
+
include Unidom::Contact::China::Concerns::AsMobilePhoneNumberSubscriber
|
36
51
|
```
|
37
52
|
|
38
53
|
### As Mobile Phone Number Subscriber concern
|
54
|
+
|
39
55
|
The As Mobile Phone Number Subscriber concern do the following tasks for the includer automatically:
|
40
56
|
1. Define the has_many :china_mobile_phone_numbers macro as: ``has_many :china_mobile_phone_numbers, through: :contact_subscriptions, source: :contact, source_type: 'Unidom::Contact::China::MobilePhoneNumber'``
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
10
10
|
rdoc.rdoc_dir = 'rdoc'
|
11
11
|
rdoc.title = 'Unidom Contact China'
|
12
12
|
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
@@ -20,5 +20,5 @@ load 'rails/tasks/statistics.rake'
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
|
23
|
+
require 'bundler/gem_tasks'
|
24
24
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
6
|
//
|
7
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.
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
9
|
//
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
@@ -6,9 +6,9 @@
|
|
6
6
|
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
7
|
*
|
8
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
|
10
|
-
*
|
11
|
-
* file per style scope.
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
13
|
*= require_self
|
14
14
|
*/
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-contact-china
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.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-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: unidom-common
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: unidom-contact
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
19
|
+
version: '1.3'
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
26
|
+
version: '1.3'
|
41
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
42
28
|
The China Region domain model engine includes Region and its relative models. Unidom
|
43
29
|
(统一领域对象模型)是一系列的领域模型引擎。中国联系方式领域模型引擎包括中国大陆的移动电话号码及其相关的模型。
|
@@ -50,10 +36,14 @@ files:
|
|
50
36
|
- MIT-LICENSE
|
51
37
|
- README.md
|
52
38
|
- Rakefile
|
39
|
+
- app/assets/config/unidom-contact-china_manifest.js
|
53
40
|
- app/assets/javascripts/unidom/contact/china/application.js
|
54
41
|
- app/assets/stylesheets/unidom/contact/china/application.css
|
55
42
|
- app/controllers/unidom/contact/china/application_controller.rb
|
56
43
|
- app/helpers/unidom/contact/china/application_helper.rb
|
44
|
+
- app/jobs/unidom/contact/china/application_job.rb
|
45
|
+
- app/mailers/unidom/contact/china/application_mailer.rb
|
46
|
+
- app/models/unidom/contact/china/application_record.rb
|
57
47
|
- app/models/unidom/contact/china/concerns/as_mobile_phone_number_subscriber.rb
|
58
48
|
- app/models/unidom/contact/china/mobile_phone_number.rb
|
59
49
|
- app/views/layouts/unidom/contact/china/application.html.erb
|