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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92e19ae4f118e928256eebed48e69b465fa80a4d
4
- data.tar.gz: 05c7f801c10adc54045b4a7a3dc0917ba7c5e744
3
+ metadata.gz: 2542e949c8790fdda2853591a4ff6ba813d012d2
4
+ data.tar.gz: 4a56e18ab1676b9101b2e00441a66e7e1079c544
5
5
  SHA512:
6
- metadata.gz: 03316db456aeaf630a3e76421b790f9e23bfcabceb98a4a2050bf7b9491e77f77e44c4b11cde17431d2244e5a373f71f988882a1eca31feadd9064e8e9ac41a5
7
- data.tar.gz: ae55431310b1bd92fa3fb5a01d1fe7b15b36d6261baf6f410e4b7daa0567f8e736519dedfacc7cdeaab327412c27655dbbe26a56e3652b91ca2c61b87f7a0c44
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]
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "0.1.16"
2
+ VERSION = "0.1.17"
3
3
  end
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.16
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 00:00:00.000000000 Z
15
+ date: 2013-10-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: minitest