intercom 2.4.3 → 2.4.4

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: 97bae6f804544dc4b64cab0d92514b8146f09ba5
4
- data.tar.gz: a10b64e3f44e2c35c4d929f43a04f2c37790b5d2
3
+ metadata.gz: 82ddbad91e926ed0c894fe37d0695240b4057b45
4
+ data.tar.gz: 634738ed9ce4a02e1905a8d57d1c14deb46b540a
5
5
  SHA512:
6
- metadata.gz: 46e7669169fd64f577f888707ae5ce6004b51c01356be19a28988f4e3a10696361fc363f05e0983f13f9f6d58287391221d1567b242e9feb870ccab0cecc7ac5
7
- data.tar.gz: 1e6cb49b7fec53b3077319cd781ce7cc2377d3f05a7022f89f09f268bd79472cfd4e2e58e6f016dfc1bef45c4234adcaa867e07aa3cffc08d02c022b47646a19
6
+ metadata.gz: 2f185aab2e94659bece31fa08edfee6282b9757a51c2ee3d17ec6ec125b2208b9495c6cbac701b726c4db43d74cd39b9b701d8c2a39982ac67236b67ab042b8e
7
+ data.tar.gz: cff5588e8520d1f0589467642ba2b1fd94c599c00424eba192a345b77c5d6913b721685fe65bacd08174e6a4c6c2f66445b033661fd73850ddfc0d6a7e21bfee
data/README.md CHANGED
@@ -19,7 +19,7 @@ This version of the gem is compatible with `Ruby 2.1`, `Ruby 2.0` & `Ruby 1.9.3`
19
19
 
20
20
  Using bundler:
21
21
 
22
- gem 'intercom', "~> 2.4.3"
22
+ gem 'intercom', "~> 2.4.4"
23
23
 
24
24
  ## Basic Usage
25
25
 
@@ -61,7 +61,7 @@ user = Intercom::User.find(:user_id => "1")
61
61
  # Find user by id
62
62
  user = Intercom::User.find(:id => "1")
63
63
  # Create a user
64
- user = Intercom::User.create(:email => "bob@example.com", :name => "Bob Smith")
64
+ user = Intercom::User.create(:email => "bob@example.com", :name => "Bob Smith", :signed_up_at => Time.now.to_i)
65
65
  # Update custom_attributes for a user
66
66
  user.custom_attributes["average_monthly_spend"] = 1234.56; user.save
67
67
  # Perform incrementing
@@ -356,4 +356,3 @@ Calling `Intercom.rate_limit_details` returns a Hash that contains details about
356
356
  Intercom.rate_limit_details
357
357
  #=> {:limit=>180, :remaining=>179, :reset_at=>2014-10-07 14:58:00 +0100}
358
358
  ```
359
-
@@ -1,3 +1,6 @@
1
+ 2.4.4
2
+ - Fix parsing nil lists from notifications
3
+
1
4
  2.4.3
2
5
  - Updates to remove warning when running in Ruby 2.2.0 (thanks @pat @jwaldrip)
3
6
 
@@ -31,6 +31,7 @@ module Intercom
31
31
  end
32
32
 
33
33
  def deserialize_collection(collection_json)
34
+ return [] if collection_json == nil
34
35
  collection_json.map { |item_json| TypedJsonDeserializer.new(item_json).deserialize }
35
36
  end
36
37
 
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "2.4.3"
2
+ VERSION = "2.4.4"
3
3
  end
@@ -41,5 +41,28 @@ describe "Intercom::Notification" do
41
41
  payload = Intercom::Notification.new(test_conversation_notification)
42
42
  payload.model.user.must_be_instance_of Intercom::User
43
43
  end
44
+
45
+ it "returns inner User object with nil tags" do
46
+ user_notification = {
47
+ "type" => "notification_event",
48
+ "app_id" => "aa11aa",
49
+ "data" => {
50
+ "type" => "notification_event_data",
51
+ "item" => {
52
+ "type" => "user",
53
+ "id" => "abc123def",
54
+ "user_id" => "666",
55
+ "email" => "joe@example.com",
56
+ "name" => "Joe",
57
+ "tags" => {
58
+ "type" => "tag.list",
59
+ "tags" => nil
60
+ }
61
+ }
62
+ },
63
+ }
64
+ payload = Intercom::Notification.new(user_notification)
65
+ payload.model.tags.must_equal([])
66
+ end
44
67
 
45
- end
68
+ 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: 2.4.3
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben McRedmond
@@ -15,76 +15,76 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2014-12-29 00:00:00.000000000 Z
18
+ date: 2015-01-19 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: minitest
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.4'
27
27
  type: :development
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.4'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.3'
41
41
  type: :development
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.3'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: mocha
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: fakeweb
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.3'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: json
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.8'
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.8'
90
90
  description: 'Intercom (https://www.intercom.io) is a customer relationship management
@@ -103,8 +103,8 @@ executables: []
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
- - ".gitignore"
107
- - ".travis.yml"
106
+ - .gitignore
107
+ - .travis.yml
108
108
  - Gemfile
109
109
  - MIT-LICENSE
110
110
  - README.md
@@ -178,17 +178,17 @@ require_paths:
178
178
  - lib
179
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - ">="
181
+ - - '>='
182
182
  - !ruby/object:Gem::Version
183
183
  version: 1.9.3
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - ">="
186
+ - - '>='
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
190
  rubyforge_project: intercom
191
- rubygems_version: 2.4.5
191
+ rubygems_version: 2.0.14
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Ruby bindings for the Intercom API