intercom 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/changes.txt +4 -1
- data/lib/intercom/user.rb +14 -0
- data/lib/intercom/version.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/unit/intercom/user_spec.rb +1 -0
- metadata +9 -4
data/changes.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
0.1.6
|
2
|
+
- Add unsubscribed_from_emails and unsubscribed_from_emails= to user
|
3
|
+
|
1
4
|
0.1.5
|
2
5
|
- Always convert times to unix timestamps for the wire (thanks @jgwhite)
|
3
6
|
|
@@ -39,4 +42,4 @@
|
|
39
42
|
- updates to reflect changes to resources served by the api
|
40
43
|
|
41
44
|
0.0.1
|
42
|
-
- experimental version
|
45
|
+
- experimental version
|
data/lib/intercom/user.rb
CHANGED
@@ -194,6 +194,20 @@ module Intercom
|
|
194
194
|
set_time_at("created_at", time)
|
195
195
|
end
|
196
196
|
|
197
|
+
##
|
198
|
+
# Get whether user has unsubscribed from email
|
199
|
+
# @return [Boolean]
|
200
|
+
def unsubscribed_from_emails
|
201
|
+
@attributes['unsubscribed_from_emails']
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# Set whether user has unsubscribed from email
|
206
|
+
# @return [void]
|
207
|
+
def unsubscribed_from_emails=(unsubscribed_from_emails)
|
208
|
+
@attributes['unsubscribed_from_emails'] = unsubscribed_from_emails
|
209
|
+
end
|
210
|
+
|
197
211
|
##
|
198
212
|
# Get array of Intercom::SocialProfile objects attached to this Intercom::User
|
199
213
|
#
|
data/lib/intercom/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -14,6 +14,7 @@ def test_user(email="bob@example.com")
|
|
14
14
|
:relationship_score => 90,
|
15
15
|
:session_count => 123,
|
16
16
|
:last_impression_at => 1323422442,
|
17
|
+
:unsubscribed_from_emails => true,
|
17
18
|
:social_profiles => [
|
18
19
|
{"type" => "twitter", "url" => "http://twitter.com/abc", "username" => "abc"},
|
19
20
|
{"type" => "twitter", "username" => "abc2", "url" => "http://twitter.com/abc2"},
|
@@ -104,4 +105,4 @@ def unshuffleable_array(array)
|
|
104
105
|
self
|
105
106
|
end
|
106
107
|
array
|
107
|
-
end
|
108
|
+
end
|
@@ -42,6 +42,7 @@ describe "Intercom::User" do
|
|
42
42
|
user.relationship_score.must_equal 90
|
43
43
|
user.last_seen_ip.must_equal "1.2.3.4"
|
44
44
|
user.last_seen_user_agent.must_equal "Mozilla blah blah ie6"
|
45
|
+
user.unsubscribed_from_emails.must_equal true
|
45
46
|
end
|
46
47
|
|
47
48
|
it "has read-only social accounts" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intercom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2013-03-
|
16
|
+
date: 2013-03-28 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: minitest
|
@@ -119,15 +119,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- - ! '>='
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
|
+
segments:
|
123
|
+
- 0
|
124
|
+
hash: 2662975996063924397
|
122
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
126
|
none: false
|
124
127
|
requirements:
|
125
128
|
- - ! '>='
|
126
129
|
- !ruby/object:Gem::Version
|
127
130
|
version: '0'
|
131
|
+
segments:
|
132
|
+
- 0
|
133
|
+
hash: 2662975996063924397
|
128
134
|
requirements: []
|
129
135
|
rubyforge_project: intercom
|
130
|
-
rubygems_version: 1.8.
|
136
|
+
rubygems_version: 1.8.24
|
131
137
|
signing_key:
|
132
138
|
specification_version: 3
|
133
139
|
summary: Ruby bindings for the Intercom API
|
@@ -142,4 +148,3 @@ test_files:
|
|
142
148
|
- spec/unit/intercom/user_resource_spec.rb
|
143
149
|
- spec/unit/intercom/user_spec.rb
|
144
150
|
- spec/unit/intercom_spec.rb
|
145
|
-
has_rdoc:
|