intercom 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2968a8daa352305b8c7b2f56defb9b94762fac0
4
- data.tar.gz: eef8b22588e52cf18ef2a209b0d096783fe2a07e
3
+ metadata.gz: 515802ff1485e49789659e0f6e8ff7a97991efef
4
+ data.tar.gz: f9b1670d919cf0051ae235fc48da54cc06ed8bcd
5
5
  SHA512:
6
- metadata.gz: 6d914f944a26960af0232c7e433aba840543659a08048b52dbe8d0b06370d810c03e4a0c221962eae0881341433f3f3a7c977bc47e6cb1a34dfcac9d8f11b7b6
7
- data.tar.gz: 457d912fa47ba223f2aca662df973a7299cea9d3212bf3c9f64306b0ed1857f2d99c15d1a197b86c095a277b761d66b85332a96f01c05d188146d22c495e1497
6
+ metadata.gz: d4358b8c0ca1294f01d5cf515bdd70ff14ffc3afb2a0d55d5d37f0eaa4d63a6ca116ff3b84b33b8bc738aa1fe4c0fbfa4cb2279748b363ded3e36f4ddd585dce
7
+ data.tar.gz: ea2adc6ea9b836d671a43e27b0e116c9a9ac6b8fcad56c7dcb6fcbcb45904ab64ce72733e1d9b629cd86a151c415a97f59906932ce3eb28888aa330026be54f2
data/README.md CHANGED
@@ -22,7 +22,7 @@ This version of the gem is compatible with `Ruby 2.1` and above.
22
22
 
23
23
  Using bundler:
24
24
 
25
- gem 'intercom', "~> 3.0.4"
25
+ gem 'intercom', "~> 3.0.5"
26
26
 
27
27
  ## Basic Usage
28
28
 
@@ -1,3 +1,6 @@
1
+ 3.0.5
2
+ - Fix id-based updates on Contacts (thanks @gevans)
3
+
1
4
  3.0.4
2
5
  - Support the `all` resource on Contacts
3
6
 
@@ -21,7 +21,7 @@ module Intercom
21
21
  def save(object)
22
22
  collection_name = Utils.resource_class_to_collection_name(collection_class)
23
23
  if id_present?(object) && !posted_updates?(object)
24
- response = @client.put("/#{collection_name}/#{id}", object.to_submittable_hash)
24
+ response = @client.put("/#{collection_name}/#{object.id}", object.to_submittable_hash)
25
25
  else
26
26
  response = @client.post("/#{collection_name}", object.to_submittable_hash.merge(identity_hash(object)))
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module Intercom #:nodoc:
2
- VERSION = "3.0.4"
2
+ VERSION = "3.0.5"
3
3
  end
@@ -15,6 +15,12 @@ describe "Intercom::Contact" do
15
15
  client.contacts.create
16
16
  end
17
17
 
18
+ it 'can update a contact with an id' do
19
+ contact = Intercom::Contact.new(:id => "de45ae78gae1289cb")
20
+ client.expects(:put).with("/contacts/de45ae78gae1289cb", {'custom_attributes' => {}})
21
+ client.contacts.save(contact)
22
+ end
23
+
18
24
  describe 'converting' do
19
25
  let(:contact) { Intercom::Contact.from_api(user_id: 'contact_id') }
20
26
  let(:user) { Intercom::User.from_api(id: 'user_id') }
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: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben McRedmond
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2015-07-13 00:00:00.000000000 Z
18
+ date: 2015-07-14 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: minitest