unidom-contact 0.3 → 0.3.1

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: 8597e13821235e2d9446c1889fd11bc7e5f0af9e
4
- data.tar.gz: 8949246d9a869af67a14349c068d308892bbe52f
3
+ metadata.gz: 07f1b0835313aa8ca9a709a31cbe486da71c57c9
4
+ data.tar.gz: 713db3fc0abd766caaaf9ee338bfadd5cee4db18
5
5
  SHA512:
6
- metadata.gz: b93f0428812782f1da5b6afbe5d84ca46cd6d8444c0b5afaba24a8ded098f6991de02d36262b86cd31b9a584ead2a255fbc350055a0bdb5b3c030723c20a3bfb
7
- data.tar.gz: fe14e4eec22560e263a2afa0f3c74b1c8616f5f60cf77c819bf1794e7ecfe0b549bb4770e86061439b26202cdfc199824a26b887ec8ee03389611d022c283ca2
6
+ metadata.gz: ca596562337dc54bfc82e1ff37de3775c7361b49253e41bf454eeccfdb4b0cba8e6d8838074d51bc5e313933c64e1d49927c629f213e21219568e8875b1e26a1
7
+ data.tar.gz: 8540737f5f07e5e3f5caa99828eba87db2754031d4e775a8a440e33eaedd47ddbfc080e39d19bb82531bc898b93cf88b17413b3e98cb352de8239cf1fa3367fe
data/README.md CHANGED
@@ -6,6 +6,10 @@
6
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.
7
7
  Unidom (统一领域对象模型)是一系列的领域模型引擎。联系方式领域模型引擎包括联系方式订阅和电子邮箱地址的模型。
8
8
 
9
+ ## Recent Update
10
+ Check out the [Road Map](ROADMAP.md) to find out what's the next.
11
+ Check out the [Change Log](CHANGELOG.md) to find out what's new.
12
+
9
13
  ## Usage in Gemfile
10
14
  ```ruby
11
15
  gem 'unidom-contact'
@@ -20,7 +24,7 @@ rake db:migrate
20
24
  ```ruby
21
25
  contact = MobilePhoneNumber.create phone_number: '13912345678'
22
26
  subscriber = Person.create name: 'John'
23
- subscription = Unidom::Contact::ContactSubscription.subscribe contact, subscriber, name: 'John Mobile', primary: true, grade: 0, priority: 0
27
+ subscription = Unidom::Contact::ContactSubscription.subscribe contact, subscriber, name: 'John Mobile', primary: true, grade: 0, priority: 0, opened_at: Time.now
24
28
  # Associate the subscriber & the contact
25
29
 
26
30
  Unidom::Contact::ContactSubscription.subscribed_by(subscriber).valid_at.alive
@@ -16,8 +16,8 @@ class Unidom::Contact::ContactSubscription < ActiveRecord::Base
16
16
 
17
17
  include Unidom::Common::Concerns::ModelExtension
18
18
 
19
- def self.subscribe(contact, subscriber, name: subscriber.name, primary: false, grade: 0, priority: 0)
20
- contact_is(contact).subscribed_by(subscriber).valid_at.alive.first_or_create name: name, elemental: primary, grade: grade, priority: priority, opened_at: Time.now
19
+ def self.subscribe(contact, subscriber, name: subscriber.name, primary: false, grade: 0, priority: 0, opened_at: Time.now)
20
+ contact_is(contact).subscribed_by(subscriber).valid_at.alive.first_or_create name: name, elemental: primary, grade: grade, priority: priority, opened_at: opened_at
21
21
  end
22
22
 
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Contact
3
- VERSION = '0.3'.freeze
3
+ VERSION = '0.3.1'.freeze
4
4
  end
5
5
  end
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.3'
4
+ version: 0.3.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-03-23 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common