restforce 4.2.1 → 4.2.2

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
  SHA256:
3
- metadata.gz: c4f7647ad705f0f4eac359a3b1e792ab4603e9ae4d177570e9369734f7ff3356
4
- data.tar.gz: 7fc076cb9239ebd513926e068d5d1e4ebec01cbb5245e919fd165ea5bf7b841c
3
+ metadata.gz: 414c3c4cb8ef46b5f943d190aa10d750c58c06d18ab280ba5dd34883cc684a80
4
+ data.tar.gz: fa27e1d169c51af87ef5a2a10c80ffe9619f01f34efc54778a92361147b37e2a
5
5
  SHA512:
6
- metadata.gz: ad1cfc119e9d3a64d5491c667254647a1e79298bebb7c036dee95f87b2a6823f0ed5fbb862dc29c6d25166399042767ecae5520498726fa4025b99b439bcd9f1
7
- data.tar.gz: f8e0ab3e2cc1e74e4a1d8d50da2ca8b5bcb13436765993c8737582703248c1c47ca2c6ff02430f19390c02f1b5d95960e6d40e5510ef53e5b25d4e61add35ecc
6
+ metadata.gz: 227bb7793df6e71fda10d1c3d89b77c066525f0d5dee759a06900cec3bee8e7c2361cc395681a3cd0b0d547b16afb13bd19f707c750372357fd95da1697e4e12
7
+ data.tar.gz: bfe499dc745c3f32d624cad78dbafc1c5b3777b4381d6ead38eeaae026d489ec22aa2719c0607b8923f0889744b87bf5a35694f201fd22d9418a5aefcf1f0a4d
@@ -1,3 +1,7 @@
1
+ ## 4.2.2 (Jan 23, 2020)
2
+
3
+ * Fix `NoMethodError: undefined method '[]' for nil:NilClass` error when generating objects to return (@apurkiss)
4
+
1
5
  ## 4.2.1 (Dec 4, 2019)
2
6
 
3
7
  * Handle empty response bodies returned with authentication errors (@sylvandor)
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', '~> 4.2.0'
28
+ gem 'restforce', '~> 4.2.2'
29
29
 
30
30
  And then execute:
31
31
 
@@ -28,7 +28,7 @@ module Restforce
28
28
  # of sobject records.
29
29
  Restforce::Collection
30
30
  elsif val.key? 'attributes'
31
- case (val['attributes']['type'])
31
+ case val.dig('attributes', 'type')
32
32
  when "Attachment"
33
33
  Restforce::Attachment
34
34
  when "Document"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '4.2.1'
4
+ VERSION = '4.2.2'
5
5
  end
@@ -33,6 +33,11 @@ describe Restforce::Mash do
33
33
  let(:input) { { 'attributes' => { 'type' => 'Document' } } }
34
34
  it { should eq Restforce::Document }
35
35
  end
36
+
37
+ context 'when the attributes value is nil' do
38
+ let(:input) { { 'attributes' => nil } }
39
+ it { should eq Restforce::SObject }
40
+ end
36
41
  end
37
42
 
38
43
  context 'else' 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: 4.2.1
4
+ version: 4.2.2
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: 2019-12-04 00:00:00.000000000 Z
12
+ date: 2020-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday