intercom 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/intercom/user.rb +7 -0
- data/lib/intercom/version.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/unit/intercom/user_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2542e949c8790fdda2853591a4ff6ba813d012d2
|
4
|
+
data.tar.gz: 4a56e18ab1676b9101b2e00441a66e7e1079c544
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0569d66b5412fb386aa66f79f5cc72284a78853b5a111cf3b704246cf153f2acfb024d659f519b5723307472984a95c6bd949a19e727f4cfd12cbe96600d2c8d
|
7
|
+
data.tar.gz: 98eed931b9e8ef92484af33fb5b8d315126f4f0d1c08b52a2d6b25d8209aa422998729b4ab112accd9fab8ed8be6c95db092b6c42fac42557044e1cff7f21352
|
data/lib/intercom/user.rb
CHANGED
@@ -226,6 +226,13 @@ module Intercom
|
|
226
226
|
@attributes['unsubscribed_from_emails']
|
227
227
|
end
|
228
228
|
|
229
|
+
##
|
230
|
+
# Get url for user's avatar, if present. Otherwise, nil.
|
231
|
+
# @return [String]
|
232
|
+
def avatar_url
|
233
|
+
@attributes["avatar_url"]
|
234
|
+
end
|
235
|
+
|
229
236
|
##
|
230
237
|
# Set whether user has unsubscribed from email
|
231
238
|
# @return [void]
|
data/lib/intercom/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -15,6 +15,7 @@ def test_user(email="bob@example.com")
|
|
15
15
|
:session_count => 123,
|
16
16
|
:last_impression_at => 1323422442,
|
17
17
|
:unsubscribed_from_emails => true,
|
18
|
+
:avatar_url => "http://google.com/logo.png",
|
18
19
|
:social_profiles => [
|
19
20
|
{"type" => "twitter", "url" => "http://twitter.com/abc", "username" => "abc"},
|
20
21
|
{"type" => "twitter", "username" => "abc2", "url" => "http://twitter.com/abc2"},
|
@@ -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.avatar_url.must_equal "http://google.com/logo.png"
|
45
46
|
user.unsubscribed_from_emails.must_equal true
|
46
47
|
user.location_data['country_code'].must_equal "IRL"
|
47
48
|
end
|
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.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-10-
|
15
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: minitest
|