unidom-contact 0.1 → 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 460f49f73d43bd505a2e7c7653bfb7925e3a11a2
|
|
4
|
+
data.tar.gz: 79ac76121185d0df60ea9fb79010221d14c04e7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 495ca251c7c37284144f103962e16d1fc23c13f639c63a52cd156044dcb3b2c6ffc2daae606df57e0a0ebdd63b56dd6542034e38d8e1e7a6ec18b1cce2c87b0f
|
|
7
|
+
data.tar.gz: 48874bd6794fb065d272ff654cde98976c938a4cb658afd9ad8590e5052a508582ebaa780b12ff6fa27998b89fea162fdc3aa62dfe8406c4d9d9cfb9f03442c5
|
data/README.md
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
# Unidom Contact
|
|
1
|
+
# Unidom Contact 联系方式领域模型引擎
|
|
2
|
+
|
|
3
|
+
[](http://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://badge.fury.io/rb/unidom-contact)
|
|
2
5
|
|
|
3
6
|
Unidom (UNIfied Domain Object Model) is a series of domain model engines. The Contact domain model engine includes Contact Subscription and Email Address models.
|
|
4
7
|
Unidom (统一领域对象模型)是一系列的领域模型引擎。联系方式领域模型引擎包括联系方式订阅和电子邮箱地址的模型。
|
|
5
8
|
|
|
6
|
-
## Usage in Gemfile
|
|
9
|
+
## Usage in Gemfile
|
|
7
10
|
```ruby
|
|
8
11
|
gem 'unidom-contact'
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
## Run the Database Migration
|
|
14
|
+
## Run the Database Migration
|
|
12
15
|
```shell
|
|
13
16
|
rake db:migrate
|
|
14
17
|
```
|
|
15
18
|
|
|
16
|
-
## Call the Model
|
|
19
|
+
## Call the Model
|
|
17
20
|
```ruby
|
|
18
21
|
Unidom::Contact::ContactSubscription.subscribed_by(subscriber).valid_at.alive.first
|
|
19
22
|
Unidom::Contact::EmailAddress.full_address_is('topbit.du@gmail.com').first
|
|
@@ -15,6 +15,8 @@ class Unidom::Contact::EmailAddress < ActiveRecord::Base
|
|
|
15
15
|
scope :local_part_is, ->(local_part) { where local_part: local_part }
|
|
16
16
|
scope :domain_part_is, ->(domain_part) { where domain_part: domain_part }
|
|
17
17
|
|
|
18
|
+
include Unidom::Common::Concerns::ModelExtension
|
|
19
|
+
|
|
18
20
|
before_validation do
|
|
19
21
|
self.full_address.strip!
|
|
20
22
|
self.personalized_name = self.full_address if self.personalized_name.blank?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unidom-contact
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.2'
|
|
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-02-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: unidom-common
|
|
@@ -73,6 +73,5 @@ rubyforge_project:
|
|
|
73
73
|
rubygems_version: 2.4.5.1
|
|
74
74
|
signing_key:
|
|
75
75
|
specification_version: 4
|
|
76
|
-
summary:
|
|
77
|
-
models.
|
|
76
|
+
summary: Unidom Contact Domain Model Engine 联系方式领域模型引擎
|
|
78
77
|
test_files: []
|