restforce 6.2.2 → 6.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +1 -1
- data/.github/workflows/faraday.yml +1 -1
- data/CHANGELOG.md +9 -1
- data/Gemfile +2 -2
- data/README.md +1 -8
- data/lib/restforce/concerns/connection.rb +2 -2
- data/lib/restforce/error_code.rb +15 -0
- data/lib/restforce/middleware/authentication.rb +1 -1
- data/lib/restforce/middleware/json_request.rb +1 -1
- data/lib/restforce/middleware/json_response.rb +1 -1
- data/lib/restforce/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d97cb818f5a5a454ee219c4d0042a9fb3d39d410fdeebd1aefe07fd9787ddcf
|
4
|
+
data.tar.gz: 584614d9bfd4f92b52c62476168cb974999bedd3406829516e75d66fd9f50d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da659c7c074a0a05b7839a3f28268a3c7c513d5e26a98f0fad80bc2d9c4f8dde9686eefdfce16b54609a41419820949750ef4a81505112c71f8203292ded3583
|
7
|
+
data.tar.gz: c7b03f3ad45db1a83fc2f47c42e00761ca99c8f9a659b217bfaa9ac6d22deffc1346fb7024a87865c69cb658de30ca83d461a8a9db127be49bd6dfa32adb03c6
|
data/.github/workflows/build.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 6.2.4 (Oct 8, 2023)
|
2
|
+
|
3
|
+
* Register the custom JSON middleware for Faraday with a more unique name to avoid clashes with other middleware (@dbackeus)
|
4
|
+
|
5
|
+
# 6.2.3 (Jun 18 2023)
|
6
|
+
|
7
|
+
* Handle the `CANNOT_DELETE_OWNER`, `CANNOT_POST_TO_ARCHIVED_GROUP`, `INVALID_INPUT`, `INVALID_MARKUP` and `INVALID_SEARCH` errors returned by the Salesforce API (@spurton)
|
8
|
+
|
1
9
|
# 6.2.2 (Mar 24 2023)
|
2
10
|
|
3
11
|
* Handle the `INSUFFICIENT_ACCESS` error returned by the Salesforce API (@timrogers, @nstuart-at-salesforce)
|
@@ -9,7 +17,7 @@
|
|
9
17
|
# 6.2.0 (Jan 18 2023)
|
10
18
|
|
11
19
|
* Add support for `faraday` v2.7.x (@timrogers)
|
12
|
-
* Expose the Faraday `Response` on `CompositeAPIError`s (@shravan097)
|
20
|
+
* Expose the Faraday `Response` on` `CompositeAPIError`s (@shravan097)
|
13
21
|
|
14
22
|
# 6.1.0 (Nov 18 2022)
|
15
23
|
|
data/Gemfile
CHANGED
@@ -17,6 +17,6 @@ gem 'rspec', '~> 3.12.0'
|
|
17
17
|
gem 'rspec-collection_matchers', '~> 1.2.0'
|
18
18
|
gem 'rspec-its', '~> 1.3.0'
|
19
19
|
gem 'rspec_junit_formatter', '~> 0.6.0'
|
20
|
-
gem 'rubocop', '~> 1.
|
20
|
+
gem 'rubocop', '~> 1.56.3'
|
21
21
|
gem 'simplecov', '~> 0.22.0'
|
22
|
-
gem 'webmock', '~> 3.
|
22
|
+
gem 'webmock', '~> 3.19.1'
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ Features include:
|
|
27
27
|
|
28
28
|
Add this line to your application's Gemfile:
|
29
29
|
|
30
|
-
gem 'restforce', '~> 6.2.
|
30
|
+
gem 'restforce', '~> 6.2.4'
|
31
31
|
|
32
32
|
And then execute:
|
33
33
|
|
@@ -831,13 +831,6 @@ client.create!("CustomField", {
|
|
831
831
|
})
|
832
832
|
```
|
833
833
|
|
834
|
-
## Links
|
835
|
-
|
836
|
-
If you need a full Active Record experience, may be you can use
|
837
|
-
[ActiveForce](https://github.com/ionia-corporation/active_force) that wraps
|
838
|
-
Restforce and adds Associations, Query Building (like AREL), Validations and
|
839
|
-
Callbacks.
|
840
|
-
|
841
834
|
## Contributing
|
842
835
|
|
843
836
|
We welcome all contributions - they help us make Restforce the best gem possible.
|
@@ -33,7 +33,7 @@ module Restforce
|
|
33
33
|
# Handles multipart file uploads for blobs.
|
34
34
|
builder.use Restforce::Middleware::Multipart
|
35
35
|
# Converts the request into JSON.
|
36
|
-
builder.request :
|
36
|
+
builder.request :restforce_json
|
37
37
|
# Handles reauthentication for 403 responses.
|
38
38
|
if authentication_middleware
|
39
39
|
builder.use authentication_middleware, self, options
|
@@ -52,7 +52,7 @@ module Restforce
|
|
52
52
|
# Raises errors for 40x responses.
|
53
53
|
builder.use Restforce::Middleware::RaiseError
|
54
54
|
# Parses returned JSON response into a hash.
|
55
|
-
builder.response :
|
55
|
+
builder.response :restforce_json, content_type: /\bjson$/
|
56
56
|
# Compress/Decompress the request/response
|
57
57
|
unless adapter == :httpclient
|
58
58
|
builder.use Restforce::Middleware::Gzip, self, options
|
data/lib/restforce/error_code.rb
CHANGED
@@ -43,6 +43,8 @@ module Restforce
|
|
43
43
|
|
44
44
|
class CannotDeleteLastDatedConversionRate < ResponseError; end
|
45
45
|
|
46
|
+
class CannotDeleteOwner < ResponseError; end
|
47
|
+
|
46
48
|
class CannotDeleteManagedObject < ResponseError; end
|
47
49
|
|
48
50
|
class CannotDisableLastAdmin < ResponseError; end
|
@@ -55,6 +57,8 @@ module Restforce
|
|
55
57
|
|
56
58
|
class CannotModifyManagedObject < ResponseError; end
|
57
59
|
|
60
|
+
class CannotPostToArchivedGroup < ResponseError; end
|
61
|
+
|
58
62
|
class CannotRenameApexReferencedField < ResponseError; end
|
59
63
|
|
60
64
|
class CannotRenameApexReferencedObject < ResponseError; end
|
@@ -219,8 +223,12 @@ module Restforce
|
|
219
223
|
|
220
224
|
class InvalidInetAddress < ResponseError; end
|
221
225
|
|
226
|
+
class InvalidInput < ResponseError; end
|
227
|
+
|
222
228
|
class InvalidLineitemCloneState < ResponseError; end
|
223
229
|
|
230
|
+
class InvalidMarkup < ResponseError; end
|
231
|
+
|
224
232
|
class InvalidMasterOrTranslatedSolution < ResponseError; end
|
225
233
|
|
226
234
|
class InvalidMessageIdReference < ResponseError; end
|
@@ -247,6 +255,8 @@ module Restforce
|
|
247
255
|
|
248
256
|
class InvalidSaveAsActivityFlag < ResponseError; end
|
249
257
|
|
258
|
+
class InvalidSearch < ResponseError; end
|
259
|
+
|
250
260
|
class InvalidSessionId < ResponseError; end
|
251
261
|
|
252
262
|
class InvalidSignupCountry < ResponseError; end
|
@@ -436,11 +446,13 @@ module Restforce
|
|
436
446
|
"CANNOT_DELETE_LAST_DATED_CONVERSION_RATE" =>
|
437
447
|
CannotDeleteLastDatedConversionRate,
|
438
448
|
"CANNOT_DELETE_MANAGED_OBJECT" => CannotDeleteManagedObject,
|
449
|
+
"CANNOT_DELETE_OWNER" => CannotDeleteOwner,
|
439
450
|
"CANNOT_DISABLE_LAST_ADMIN" => CannotDisableLastAdmin,
|
440
451
|
"CANNOT_ENABLE_IP_RESTRICT_REQUESTS" => CannotEnableIpRestrictRequests,
|
441
452
|
"CANNOT_EXECUTE_FLOW_TRIGGER" => CannotExecuteFlowTrigger,
|
442
453
|
"CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY" => CannotInsertUpdateActivateEntity,
|
443
454
|
"CANNOT_MODIFY_MANAGED_OBJECT" => CannotModifyManagedObject,
|
455
|
+
"CANNOT_POST_TO_ARCHIVED_GROUP" => CannotPostToArchivedGroup,
|
444
456
|
"CANNOT_RENAME_APEX_REFERENCED_FIELD" => CannotRenameApexReferencedField,
|
445
457
|
"CANNOT_RENAME_APEX_REFERENCED_OBJECT" => CannotRenameApexReferencedObject,
|
446
458
|
"CANNOT_REPARENT_RECORD" => CannotReparentRecord,
|
@@ -528,7 +540,9 @@ module Restforce
|
|
528
540
|
"INVALID_FILTER_ACTION" => InvalidFilterAction,
|
529
541
|
"INVALID_ID_FIELD" => InvalidIdField,
|
530
542
|
"INVALID_INET_ADDRESS" => InvalidInetAddress,
|
543
|
+
"INVALID_INPUT" => InvalidInput,
|
531
544
|
"INVALID_LINEITEM_CLONE_STATE" => InvalidLineitemCloneState,
|
545
|
+
"INVALID_MARKUP" => InvalidMarkup,
|
532
546
|
"INVALID_MASTER_OR_TRANSLATED_SOLUTION" => InvalidMasterOrTranslatedSolution,
|
533
547
|
"INVALID_MESSAGE_ID_REFERENCE" => InvalidMessageIdReference,
|
534
548
|
"INVALID_OPERATION" => InvalidOperation,
|
@@ -543,6 +557,7 @@ module Restforce
|
|
543
557
|
"INVALID_READ_ONLY_USER_DML" => InvalidReadOnlyUserDml,
|
544
558
|
"INVALID_REPLICATION_DATE" => InvalidReplicationDate,
|
545
559
|
"INVALID_SAVE_AS_ACTIVITY_FLAG" => InvalidSaveAsActivityFlag,
|
560
|
+
"INVALID_SEARCH" => InvalidSearch,
|
546
561
|
"INVALID_SESSION_ID" => InvalidSessionId,
|
547
562
|
"INVALID_SIGNUP_COUNTRY" => InvalidSignupCountry,
|
548
563
|
"INVALID_STATUS" => InvalidStatus,
|
@@ -50,7 +50,7 @@ module Restforce
|
|
50
50
|
builder.use Faraday::Request::UrlEncoded
|
51
51
|
builder.use Restforce::Middleware::Mashify, nil, @options
|
52
52
|
builder.use Faraday::FollowRedirects::Middleware
|
53
|
-
builder.response :
|
53
|
+
builder.response :restforce_json
|
54
54
|
|
55
55
|
if Restforce.log?
|
56
56
|
builder.use Restforce::Middleware::Logger,
|
data/lib/restforce/version.rb
CHANGED
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: 6.2.
|
4
|
+
version: 6.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Rogers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -293,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
295
|
requirements: []
|
296
|
-
rubygems_version: 3.4.
|
296
|
+
rubygems_version: 3.4.20
|
297
297
|
signing_key:
|
298
298
|
specification_version: 4
|
299
299
|
summary: A lightweight Ruby client for the Salesforce REST API
|