leap_salesforce 0.2.15 → 0.2.16

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: 24f67af320072c75b675ab10a3878648d50789cf47dbd049897a7665122ceeb1
4
- data.tar.gz: 1a8f551e746ad5db54486dad45a984dfe24d06af98316499b9c5ffe02765b758
3
+ metadata.gz: d503b98e728ba7dca4891f70e6c849ee77394e626ef167c46f4ffea65470b46e
4
+ data.tar.gz: 241cfdf4533714e75546357e28bd35ddcb6d0fc6fed0bb7d8471341f28fdaec1
5
5
  SHA512:
6
- metadata.gz: 494ec17d4c97948430b734690d81047885740aeee5969df6f46081a90226758525587ddde161f05419d11a40dad34e465769ebec4c64dd6e6062620c7b5bbe62
7
- data.tar.gz: feb32e181a7e73f31650597d79f1d1944017e98419aa3809271a502b8c067428deb7554d35846e12c3fdc7754ba5245f45e4c75b66df808fb7770b8d617c087f
6
+ metadata.gz: 03f8e91a6a8e24375abef2040b0e993255c1c0d860c9f34155aa2e5bf87b2a7cea9492285b26286230874d8ee6785f322ab922ca6c09ef7a11259883d2903873
7
+ data.tar.gz: 482f87a06f2a094afc6d7eef495972a3927ba313b68fb1e5be35c61ddaefd367c937de5229258e0610b3b909471a56729be013516a9151115a6c12958c9d2725
@@ -64,7 +64,7 @@
64
64
  <orderEntry type="library" scope="PROVIDED" name="rspec-its (v1.3.0, RVM: ruby-2.6.3) [gem]" level="application" />
65
65
  <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.9.0, RVM: ruby-2.6.3) [gem]" level="application" />
66
66
  <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.9.0, RVM: ruby-2.6.3) [gem]" level="application" />
67
- <orderEntry type="library" scope="PROVIDED" name="rubocop (v0.76.0, RVM: ruby-2.6.3) [gem]" level="application" />
67
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v0.77.0, RVM: ruby-2.6.3) [gem]" level="application" />
68
68
  <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.10.1, RVM: ruby-2.6.3) [gem]" level="application" />
69
69
  <orderEntry type="library" scope="PROVIDED" name="savon (v2.12.0, RVM: ruby-2.6.3) [gem]" level="application" />
70
70
  <orderEntry type="library" scope="PROVIDED" name="simplecov (v0.17.1, RVM: ruby-2.6.3) [gem]" level="application" />
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.2.16
2
+ * Bug fix
3
+ * Fixed unset and added a test for it. Only works currently with explicit backend name
4
+
1
5
  Version 0.2.15
2
6
  * Enhancement
3
7
  * Ability to set SFDX Access token and instance url manually through ENV vars
@@ -77,9 +77,16 @@ class SoqlData < Exchange
77
77
  @api_user = LeapSalesforce.api_user
78
78
 
79
79
  # Unsets the element so it's not set in the request at all (not just not setting it to empty)
80
+ # @todo: Allow mapping from ruby created field name to use as a parameter
80
81
  # @param [String, Symbol] element_to_unset Element to remove from being sent
81
- def unset=(element_to_unset)
82
- @override_parameters[:body].delete element_to_unset.to_sym
82
+ # @param [Boolean] error Whether to raise error if value to unset is not present
83
+ def unset=(element_to_unset, error: true)
84
+ converted_element = element_to_unset.to_s
85
+ unless @override_parameters[:body].key?(converted_element) && error
86
+ raise LeapSalesforce::RequestError, "No backend name #{element_to_unset} in #{@override_parameters[:body]}\n" \
87
+ "Valid values are #{@override_parameters[:body].keys}"
88
+ end
89
+ @override_parameters[:body].delete converted_element
83
90
  end
84
91
 
85
92
  # Extract the id or return the cached version of it
@@ -2,5 +2,5 @@
2
2
 
3
3
  module LeapSalesforce
4
4
  # @return [String] Version of leap salesforce
5
- VERSION = '0.2.15'
5
+ VERSION = '0.2.16'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leap_salesforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - IQA
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-11-27 00:00:00.000000000 Z
12
+ date: 2019-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler