unidom-contact-china 1.0.3 → 1.0.4

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: c26cf082a4b0a9aec28ac53a1ef25b257065df33
4
- data.tar.gz: 4064149e89f76c1f032d5ae4ccadb7f5ac81fd8b
3
+ metadata.gz: f4edbad639d754e7b9b12bf4bb512b6fe41b6736
4
+ data.tar.gz: daebec9390fbbbeaae51f81e95623ba429456600
5
5
  SHA512:
6
- metadata.gz: 880eadad624f3cfafffb0b53cc529ec95c3c03425a3a95fb1380b19a14a627b5fc0e85e89677e59b788746e021da2d0b50698f419ce6617edde81b6661cb1812
7
- data.tar.gz: c863764603b161aa2a14c13c0a0254b95f52bac1d0f69542c9824963b2612a81f9a7174d127d651b1b5e50d6a62a358c1f6a6babbe066f4c212eeb2a6ab8fce4
6
+ metadata.gz: 8af4b06f14b739c2b41b672ec171ea6fe587ab4e2dd894453b82c9326700a36fceeedb5314394165fae0d55c033d18f37ecdd8e67eed6f7602daf3e08bde2446
7
+ data.tar.gz: 98c3bc06866760db1bef83bff521a0a6cdf777448678ce94447f09dc3622577e18fb38ec51ce71039e915e5e4741b85649541f366cefb957cb0ac39cd7da93fc
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Unidom Contact China 中国联系方式领域模型引擎
2
2
 
3
+ [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/unidom-contact-china/frames)
3
4
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
5
+
4
6
  [![Gem Version](https://badge.fury.io/rb/unidom-contact-china.svg)](https://badge.fury.io/rb/unidom-contact-china)
5
7
  [![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/unidom-contact-china.svg)](https://gemnasium.com/github.com/topbitdu/unidom-contact-china)
6
8
 
@@ -56,5 +58,21 @@ include Unidom::Contact::China::Concerns::AsMobilePhoneNumberSubscriber
56
58
 
57
59
  ### As Mobile Phone Number Subscriber concern
58
60
 
59
- The As Mobile Phone Number Subscriber concern do the following tasks for the includer automatically:
61
+ The As Mobile Phone Number Subscriber concern do the following tasks for the includer automatically:
60
62
  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'``
63
+
64
+
65
+
66
+ ## Disable the Model & Migration
67
+
68
+ If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
69
+ ```ruby
70
+ # config/initializers/unidom.rb
71
+ Unidom::Common.configure do |options|
72
+
73
+ options[:neglected_namespaces] = %w{
74
+ Unidom::Contact::China
75
+ }
76
+
77
+ end
78
+ ```
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application controller 是模块内所有控制器的基类。
3
+
1
4
  class Unidom::Contact::China::ApplicationController < ActionController::Base
2
5
  protect_from_forgery with: :exception
3
6
  end
@@ -1,2 +1,5 @@
1
+ ##
2
+ # Application job 是模块内所有异步任务的基类。
3
+
1
4
  class Unidom::Contact::China::ApplicationJob < ActiveJob::Base
2
5
  end
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application mailer 是模块内所有电子邮件发送类的基类。
3
+
1
4
  class Unidom::Contact::China::ApplicationMailer < ActionMailer::Base
2
5
  default from: 'from@example.com'
3
6
  layout 'mailer'
@@ -1,3 +1,6 @@
1
+ ##
2
+ # Application record 是模块内所有模型的抽象基类。
3
+
1
4
  class Unidom::Contact::China::ApplicationRecord < ActiveRecord::Base
2
5
  self.abstract_class = true
3
6
  end
@@ -26,4 +26,4 @@ class Unidom::Contact::China::MobilePhoneNumber < Unidom::Contact::China::Applic
26
26
  self.serial_number = self.phone_number[7..10]
27
27
  end
28
28
 
29
- end
29
+ end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Contact::China::MobilePhoneNumber'
@@ -1,7 +1,7 @@
1
1
  module Unidom
2
2
  module Contact
3
3
  module China
4
- VERSION = '1.0.3'.freeze
4
+ VERSION = '1.0.4'.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-contact-china
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-contact
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1.3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.3.4
22
+ version: 1.3.5
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1.3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.3.4
32
+ version: 1.3.5
33
33
  description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
34
34
  The China Region domain model engine includes Region and its relative models. Unidom
35
35
  (统一领域对象模型)是一系列的领域模型引擎。中国联系方式领域模型引擎包括中国大陆的移动电话号码及其相关的模型。