restforce 3.0.0 → 3.0.1

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: a6f15b3e19ea1b3b90368ade66b38fafbe055997
4
- data.tar.gz: d30a34bf7ea9ca49efe0edbf1034d60080f5b837
3
+ metadata.gz: 96f8f9560cf8a66a733f7755fd374d741191b7f8
4
+ data.tar.gz: bbcfa722aefa2285b4f632b98e4109fdb585041c
5
5
  SHA512:
6
- metadata.gz: 97ddd07dbcf2415d01d7940002221d473a81343365abafdde740dc1597c4581850bdbfb571c2a747df94a586d79ce7814a76f1784e97dc9b9136bbb44be6e718
7
- data.tar.gz: 9a91f9b00c0cce33da5593b3c12dd106f7a48dd8ab5005f27255b14f6f0cd93500975571413b570ea154201ef6a86f1b44785cb8261934bcd91c7ac64c2e800a
6
+ metadata.gz: 207ba956da9189b584ae3e6362f0f46fe7cb877105d28b4550eb6c071f38aca8f8f326b04e4c7082ce129a719e2b56cb0870ae715e95eb3aee2b7ee0d027eaf0
7
+ data.tar.gz: fe5cf08c7d393d8720324a8aeceb80456b0ceda886df6cb1a185ab4b35516fe2cf89bacb0697af78fbe6da45c979320e4569d41f842f8d7c392f9fbe38f1d2e3
@@ -1,6 +1,10 @@
1
+ ## 3.0.1 (Aug 4, 2018)
2
+
3
+ * Fix `NoMethodError` when upserting an existing record (@opti)
4
+
1
5
  ## 3.0.0 (Aug 2, 2018)
2
6
 
3
- * __Deprecate support for Ruby 2.0, 2.1 and 2.2__, since [even Ruby 2.2 reached its end-of-life](https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/) in June 2018. (This is the only breaking change included in this version.)
7
+ * __Deprecate support for Ruby 2.0, 2.1 and 2.2__, since [even Ruby 2.2 reached its end-of-life]##(https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/) in June 2018. (This is the only breaking change included in this version.)
4
8
  * Fix `NoMethodError` when trying to upsert a record using a `Fixnum` as the external ID (@AlexandruCD)
5
9
  * Escape record IDs passed in to the client to identify records to find, delete, etc. (@jmdx)
6
10
  * Stop relying on our middleware for Gzip compression if you're using `httpclient`, since Faraday enables this automatically using `httpclient`'s built-in support (@shivanshgaur)
data/README.md CHANGED
@@ -25,7 +25,7 @@ Features include:
25
25
 
26
26
  Add this line to your application's Gemfile:
27
27
 
28
- gem 'restforce', '~> 3.0.0'
28
+ gem 'restforce', '~> 3.0.1'
29
29
 
30
30
  And then execute:
31
31
 
@@ -380,7 +380,7 @@ module Restforce
380
380
  api_patch "sobjects/#{sobject}/#{field}/#{CGI.escape(external_id)}", attrs
381
381
  end
382
382
 
383
- response&.body&.fetch('id', nil) ? response.body['id'] : true
383
+ response.body.respond_to?(:fetch) ? response.body.fetch('id', true) : true
384
384
  end
385
385
 
386
386
  # Public: Delete a record.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '3.0.0'
4
+ VERSION = '3.0.1'
5
5
  end
@@ -350,6 +350,16 @@ describe Restforce::Concerns::API do
350
350
  and_return(response)
351
351
  expect(result).to be_true
352
352
  end
353
+
354
+ context 'and the response body is a string' do
355
+ it 'returns true' do
356
+ response.stub(:body) { '' }
357
+ client.should_receive(:api_patch).
358
+ with('sobjects/Whizbang/External_ID__c/1234', {}).
359
+ and_return(response)
360
+ expect(result).to be_true
361
+ end
362
+ end
353
363
  end
354
364
 
355
365
  context 'when the record is found and created' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric J. Holmes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-02 00:00:00.000000000 Z
12
+ date: 2018-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday