restforce 3.0.1 → 5.1.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 +5 -5
- data/.circleci/config.yml +9 -9
- data/.github/ISSUE_TEMPLATE/unhandled-salesforce-error.md +17 -0
- data/.github/dependabot.yml +19 -0
- data/.rubocop.yml +13 -14
- data/.rubocop_todo.yml +128 -81
- data/CHANGELOG.md +107 -1
- data/CONTRIBUTING.md +21 -1
- data/Dockerfile +31 -0
- data/Gemfile +10 -6
- data/README.md +168 -31
- data/UPGRADING.md +38 -0
- data/docker-compose.yml +7 -0
- data/lib/restforce/abstract_client.rb +1 -0
- data/lib/restforce/attachment.rb +1 -0
- data/lib/restforce/collection.rb +7 -2
- data/lib/restforce/concerns/api.rb +10 -7
- data/lib/restforce/concerns/authentication.rb +10 -0
- data/lib/restforce/concerns/base.rb +4 -2
- data/lib/restforce/concerns/batch_api.rb +87 -0
- data/lib/restforce/concerns/caching.rb +7 -0
- data/lib/restforce/concerns/canvas.rb +1 -0
- data/lib/restforce/concerns/connection.rb +3 -3
- data/lib/restforce/concerns/picklists.rb +4 -3
- data/lib/restforce/concerns/streaming.rb +73 -3
- data/lib/restforce/config.rb +8 -1
- data/lib/restforce/document.rb +1 -0
- data/lib/restforce/error_code.rb +638 -0
- data/lib/restforce/file_part.rb +24 -0
- data/lib/restforce/mash.rb +8 -3
- data/lib/restforce/middleware/authentication/jwt_bearer.rb +38 -0
- data/lib/restforce/middleware/authentication.rb +7 -3
- data/lib/restforce/middleware/caching.rb +1 -1
- data/lib/restforce/middleware/instance_url.rb +1 -1
- data/lib/restforce/middleware/logger.rb +8 -7
- data/lib/restforce/middleware/multipart.rb +1 -0
- data/lib/restforce/middleware/raise_error.rb +24 -9
- data/lib/restforce/middleware.rb +2 -0
- data/lib/restforce/signed_request.rb +1 -0
- data/lib/restforce/sobject.rb +1 -0
- data/lib/restforce/tooling/client.rb +3 -3
- data/lib/restforce/version.rb +1 -1
- data/lib/restforce.rb +21 -3
- data/restforce.gemspec +11 -20
- data/spec/fixtures/test_private.key +27 -0
- data/spec/integration/abstract_client_spec.rb +83 -33
- data/spec/integration/data/client_spec.rb +6 -2
- data/spec/spec_helper.rb +24 -1
- data/spec/support/client_integration.rb +7 -7
- data/spec/support/concerns.rb +1 -1
- data/spec/support/fixture_helpers.rb +3 -5
- data/spec/support/middleware.rb +1 -2
- data/spec/unit/collection_spec.rb +20 -2
- data/spec/unit/concerns/api_spec.rb +12 -12
- data/spec/unit/concerns/authentication_spec.rb +39 -4
- data/spec/unit/concerns/batch_api_spec.rb +107 -0
- data/spec/unit/concerns/caching_spec.rb +26 -0
- data/spec/unit/concerns/connection_spec.rb +2 -2
- data/spec/unit/concerns/streaming_spec.rb +144 -4
- data/spec/unit/config_spec.rb +1 -1
- data/spec/unit/error_code_spec.rb +61 -0
- data/spec/unit/mash_spec.rb +5 -0
- data/spec/unit/middleware/authentication/jwt_bearer_spec.rb +62 -0
- data/spec/unit/middleware/authentication/password_spec.rb +2 -2
- data/spec/unit/middleware/authentication/token_spec.rb +2 -2
- data/spec/unit/middleware/authentication_spec.rb +31 -4
- data/spec/unit/middleware/gzip_spec.rb +2 -2
- data/spec/unit/middleware/raise_error_spec.rb +57 -17
- data/spec/unit/signed_request_spec.rb +1 -1
- data/spec/unit/sobject_spec.rb +2 -5
- metadata +39 -108
- data/lib/restforce/upload_io.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 68aba674731ec407d63a766c8bcf13a6a243e757e89b32c8bed07c07a2ee2a9e
|
4
|
+
data.tar.gz: 1529b415da1c3d34ff477aea87116d147d5e2bd3e74ebde236ef9292545fad54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fc24ced1a9e38b622040d0b51ea3cd3aa2d4afc994ee41a8825ee2038c1f7379c56c2a32044a938102fe47030f02183549bdd91837ffab88320d99af13d27c5
|
7
|
+
data.tar.gz: 1a0be3c634cb0b9bcea1b38463b09e62e54ceee49b44e30e852e42c14c91761eff4cf8a6a786611682cb0ba309704d85243499c00358b6e411ded15e805f421e
|
data/.circleci/config.yml
CHANGED
@@ -34,23 +34,23 @@ references:
|
|
34
34
|
destination: test-results
|
35
35
|
|
36
36
|
jobs:
|
37
|
-
build-
|
37
|
+
build-ruby30:
|
38
38
|
docker:
|
39
|
-
- image: circleci/ruby:
|
39
|
+
- image: circleci/ruby:3.0
|
40
40
|
steps: *steps
|
41
|
-
build-
|
41
|
+
build-ruby27:
|
42
42
|
docker:
|
43
|
-
- image: circleci/ruby:2.
|
43
|
+
- image: circleci/ruby:2.7
|
44
44
|
steps: *steps
|
45
|
-
build-
|
45
|
+
build-ruby26:
|
46
46
|
docker:
|
47
|
-
- image: circleci/ruby:2.
|
47
|
+
- image: circleci/ruby:2.6
|
48
48
|
steps: *steps
|
49
49
|
|
50
50
|
workflows:
|
51
51
|
version: 2
|
52
52
|
tests:
|
53
53
|
jobs:
|
54
|
-
- build-
|
55
|
-
- build-
|
56
|
-
- build-
|
54
|
+
- build-ruby30
|
55
|
+
- build-ruby27
|
56
|
+
- build-ruby26
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: Unhandled Salesforce error
|
3
|
+
about: We've recently changed the way we handle Salesforce errors to define them ahead
|
4
|
+
of time, rather than dynamically. This might mean we're missing some errors. Please
|
5
|
+
use this template to report them.
|
6
|
+
title: 'Unhandled Salesforce error: <insert error code here>'
|
7
|
+
labels: bug
|
8
|
+
assignees: timrogers
|
9
|
+
|
10
|
+
---
|
11
|
+
|
12
|
+
Restforce doesn't have a definition for the error code `INSERT ERROR CODE HERE`.
|
13
|
+
|
14
|
+
I discovered this missing error code because:
|
15
|
+
|
16
|
+
- [ ] I tried to `rescue` it or refer to it in my code
|
17
|
+
- [ ] I got this error back from Salesforce
|
@@ -0,0 +1,19 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: bundler
|
4
|
+
directory: "/"
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
open-pull-requests-limit: 10
|
8
|
+
ignore:
|
9
|
+
- dependency-name: rubocop
|
10
|
+
versions:
|
11
|
+
- 1.10.0
|
12
|
+
- 1.11.0
|
13
|
+
- 1.12.0
|
14
|
+
- 1.12.1
|
15
|
+
- 1.9.0
|
16
|
+
- dependency-name: webmock
|
17
|
+
versions:
|
18
|
+
- 3.12.0
|
19
|
+
- 3.12.1
|
data/.rubocop.yml
CHANGED
@@ -4,46 +4,45 @@ inherit_from: .rubocop_todo.yml
|
|
4
4
|
|
5
5
|
AllCops:
|
6
6
|
DisplayCopNames: true
|
7
|
-
Include:
|
8
|
-
- Rakefile
|
9
7
|
Exclude:
|
10
8
|
- .*/**/*
|
11
9
|
- vendor/**/*
|
12
|
-
|
10
|
+
NewCops: enable
|
11
|
+
TargetRubyVersion: 2.6
|
13
12
|
|
14
|
-
# Limit lines to
|
15
|
-
LineLength:
|
13
|
+
# Limit lines to 90 characters.
|
14
|
+
Layout/LineLength:
|
16
15
|
Max: 90
|
17
16
|
|
18
|
-
ClassLength:
|
17
|
+
Metrics/ClassLength:
|
19
18
|
Enabled: false
|
20
19
|
|
21
|
-
ModuleLength:
|
20
|
+
Metrics/ModuleLength:
|
22
21
|
Enabled: false
|
23
22
|
|
24
23
|
# Avoid methods longer than 30 lines of code
|
25
|
-
MethodLength:
|
24
|
+
Metrics/MethodLength:
|
26
25
|
CountComments: false # count full line comments?
|
27
26
|
Max: 87
|
28
27
|
|
29
28
|
# Avoid single-line methods.
|
30
|
-
SingleLineMethods:
|
29
|
+
Style/SingleLineMethods:
|
31
30
|
AllowIfMethodIsEmpty: true
|
32
31
|
|
33
|
-
StringLiterals:
|
32
|
+
Style/StringLiterals:
|
34
33
|
Enabled: false
|
35
34
|
|
36
|
-
GlobalVars:
|
35
|
+
Style/GlobalVars:
|
37
36
|
Enabled: false # We use them Redis + StatsD (though maybe we shouldn't?)
|
38
37
|
|
39
38
|
# Wants underscores in all large numbers. Pain in the ass for things like
|
40
39
|
# unix timestamps.
|
41
|
-
NumericLiterals:
|
40
|
+
Style/NumericLiterals:
|
42
41
|
Enabled: false
|
43
42
|
|
44
43
|
# Wants you to use the same argument names for every reduce. This seems kinda
|
45
44
|
# naff compared to naming them semantically
|
46
|
-
SingleLineBlockParams:
|
45
|
+
Style/SingleLineBlockParams:
|
47
46
|
Enabled: false
|
48
47
|
|
49
48
|
Style/SignalException:
|
@@ -72,4 +71,4 @@ Naming/FileName:
|
|
72
71
|
- Guardfile
|
73
72
|
|
74
73
|
Lint/UriEscapeUnescape:
|
75
|
-
Enabled: false
|
74
|
+
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
@@ -1,117 +1,164 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
#
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2019-10-09 21:39:40 +0100 using RuboCop version 0.75.0.
|
3
4
|
# The point is for the user to remove these configuration records
|
4
5
|
# one by one as the offenses are removed from the code base.
|
5
6
|
# Note that changes in the inspected code, or installation of new
|
6
7
|
# versions of RuboCop, may require this file to be generated again.
|
7
8
|
|
8
|
-
# Offense count:
|
9
|
+
# Offense count: 17
|
9
10
|
# Cop supports --auto-correct.
|
11
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
12
|
+
# SupportedHashRocketStyles: key, separator, table
|
13
|
+
# SupportedColonStyles: key, separator, table
|
14
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
15
|
+
Layout/HashAlignment:
|
16
|
+
Exclude:
|
17
|
+
- 'lib/restforce/middleware/logger.rb'
|
18
|
+
- 'restforce.gemspec'
|
19
|
+
- 'spec/integration/abstract_client_spec.rb'
|
20
|
+
- 'spec/unit/config_spec.rb'
|
21
|
+
|
22
|
+
# Offense count: 2
|
23
|
+
# Cop supports --auto-correct.
|
24
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
25
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
26
|
+
Layout/FirstHashElementIndentation:
|
27
|
+
Exclude:
|
28
|
+
- 'lib/restforce/concerns/connection.rb'
|
29
|
+
|
30
|
+
# Offense count: 1
|
31
|
+
# Cop supports --auto-correct.
|
32
|
+
# Configuration parameters: AllowForAlignment.
|
33
|
+
Layout/SpaceAroundOperators:
|
34
|
+
Exclude:
|
35
|
+
- 'lib/restforce.rb'
|
36
|
+
|
37
|
+
# Offense count: 8
|
38
|
+
# Cop supports --auto-correct.
|
39
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
10
40
|
Lint/UnusedBlockArgument:
|
11
|
-
|
41
|
+
Exclude:
|
42
|
+
- 'lib/restforce/concerns/api.rb'
|
43
|
+
- 'lib/restforce/concerns/batch_api.rb'
|
44
|
+
- 'lib/restforce/middleware/multipart.rb'
|
45
|
+
- 'spec/unit/config_spec.rb'
|
12
46
|
|
13
|
-
# Offense count:
|
47
|
+
# Offense count: 9
|
14
48
|
Metrics/AbcSize:
|
15
|
-
Max:
|
49
|
+
Max: 38
|
16
50
|
|
17
|
-
# Offense count:
|
51
|
+
# Offense count: 1
|
18
52
|
Metrics/CyclomaticComplexity:
|
19
|
-
Max:
|
53
|
+
Max: 8
|
20
54
|
|
21
|
-
# Offense count:
|
55
|
+
# Offense count: 1
|
22
56
|
Metrics/PerceivedComplexity:
|
23
|
-
Max:
|
57
|
+
Max: 9
|
24
58
|
|
25
|
-
# Offense count:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
59
|
+
# Offense count: 5
|
60
|
+
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
61
|
+
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
62
|
+
Naming/MemoizedInstanceVariableName:
|
63
|
+
Exclude:
|
64
|
+
- 'lib/restforce/concerns/picklists.rb'
|
65
|
+
- 'lib/restforce/concerns/streaming.rb'
|
66
|
+
|
67
|
+
# Offense count: 2
|
68
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
69
|
+
# NamePrefix: is_, has_, have_
|
70
|
+
# NamePrefixBlacklist: is_, has_, have_
|
71
|
+
# NameWhitelist: is_a?
|
72
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
73
|
+
Naming/PredicateName:
|
74
|
+
Exclude:
|
75
|
+
- 'spec/**/*'
|
76
|
+
- 'lib/restforce/collection.rb'
|
77
|
+
- 'lib/restforce/middleware/multipart.rb'
|
34
78
|
|
35
|
-
# Offense count:
|
79
|
+
# Offense count: 12
|
36
80
|
# Cop supports --auto-correct.
|
37
|
-
# Configuration parameters: EnforcedStyle,
|
81
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
|
82
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
83
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
84
|
+
# FunctionalMethods: let, let!, subject, watch
|
85
|
+
# IgnoredMethods: lambda, proc, it
|
38
86
|
Style/BlockDelimiters:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
Enabled: false
|
87
|
+
Exclude:
|
88
|
+
- 'lib/restforce/concerns/batch_api.rb'
|
89
|
+
- 'spec/support/event_machine.rb'
|
90
|
+
- 'spec/support/middleware.rb'
|
91
|
+
- 'spec/unit/concerns/base_spec.rb'
|
92
|
+
- 'spec/unit/concerns/batch_api_spec.rb'
|
93
|
+
- 'spec/unit/concerns/caching_spec.rb'
|
94
|
+
- 'spec/unit/concerns/streaming_spec.rb'
|
95
|
+
- 'spec/unit/middleware/authentication_spec.rb'
|
96
|
+
- 'spec/unit/middleware/mashify_spec.rb'
|
50
97
|
|
51
|
-
# Offense count:
|
98
|
+
# Offense count: 12
|
52
99
|
# Cop supports --auto-correct.
|
53
|
-
# Configuration parameters:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
100
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
101
|
+
# SupportedStyles: nested, compact
|
102
|
+
Style/ClassAndModuleChildren:
|
103
|
+
Exclude:
|
104
|
+
- 'lib/restforce/middleware/authentication.rb'
|
105
|
+
- 'lib/restforce/middleware/authentication/password.rb'
|
106
|
+
- 'lib/restforce/middleware/authentication/token.rb'
|
107
|
+
- 'lib/restforce/middleware/authorization.rb'
|
108
|
+
- 'lib/restforce/middleware/caching.rb'
|
109
|
+
- 'lib/restforce/middleware/custom_headers.rb'
|
110
|
+
- 'lib/restforce/middleware/gzip.rb'
|
111
|
+
- 'lib/restforce/middleware/instance_url.rb'
|
112
|
+
- 'lib/restforce/middleware/logger.rb'
|
113
|
+
- 'lib/restforce/middleware/mashify.rb'
|
114
|
+
- 'lib/restforce/middleware/multipart.rb'
|
115
|
+
- 'lib/restforce/middleware/raise_error.rb'
|
116
|
+
|
117
|
+
# Offense count: 36
|
58
118
|
Style/Documentation:
|
59
119
|
Enabled: false
|
60
120
|
|
61
|
-
# Offense count:
|
121
|
+
# Offense count: 3
|
62
122
|
Style/DoubleNegation:
|
63
|
-
|
123
|
+
Exclude:
|
124
|
+
- 'lib/restforce/concerns/picklists.rb'
|
125
|
+
- 'lib/restforce/middleware/instance_url.rb'
|
64
126
|
|
65
|
-
# Offense count:
|
127
|
+
# Offense count: 1
|
66
128
|
# Configuration parameters: MinBodyLength.
|
67
129
|
Style/GuardClause:
|
68
|
-
|
130
|
+
Exclude:
|
131
|
+
- 'lib/restforce/middleware/authentication.rb'
|
69
132
|
|
70
|
-
# Offense count:
|
71
|
-
# Cop supports --auto-correct.
|
72
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
73
|
-
Layout/IndentHash:
|
74
|
-
Enabled: false
|
75
|
-
|
76
|
-
# Offense count: 70
|
133
|
+
# Offense count: 25
|
77
134
|
# Cop supports --auto-correct.
|
135
|
+
# Configuration parameters: EnforcedStyle.
|
136
|
+
# SupportedStyles: line_count_dependent, lambda, literal
|
78
137
|
Style/Lambda:
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
# Offense count: 4
|
93
|
-
# Cop supports --auto-correct.
|
94
|
-
Style/Proc:
|
95
|
-
Enabled: false
|
138
|
+
Exclude:
|
139
|
+
- 'lib/restforce/config.rb'
|
140
|
+
- 'spec/integration/abstract_client_spec.rb'
|
141
|
+
- 'spec/unit/concerns/base_spec.rb'
|
142
|
+
- 'spec/unit/concerns/streaming_spec.rb'
|
143
|
+
- 'spec/unit/middleware/authentication_spec.rb'
|
144
|
+
- 'spec/unit/middleware/authorization_spec.rb'
|
145
|
+
- 'spec/unit/middleware/custom_headers_spec.rb'
|
146
|
+
- 'spec/unit/middleware/gzip_spec.rb'
|
147
|
+
- 'spec/unit/middleware/instance_url_spec.rb'
|
148
|
+
- 'spec/unit/middleware/logger_spec.rb'
|
149
|
+
- 'spec/unit/sobject_spec.rb'
|
96
150
|
|
97
|
-
# Offense count:
|
151
|
+
# Offense count: 5
|
98
152
|
# Cop supports --auto-correct.
|
99
153
|
Style/RedundantSelf:
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
# Cop supports --auto-correct.
|
104
|
-
Layout/SpaceBeforeFirstArg:
|
105
|
-
Enabled: false
|
154
|
+
Exclude:
|
155
|
+
- 'lib/restforce/mash.rb'
|
156
|
+
- 'lib/restforce/sobject.rb'
|
106
157
|
|
107
|
-
# Offense count:
|
108
|
-
# Cop supports --auto-correct.
|
109
|
-
# Configuration parameters: MultiSpaceAllowedForOperators.
|
110
|
-
Layout/SpaceAroundOperators:
|
111
|
-
Enabled: false
|
112
|
-
|
113
|
-
# Offense count: 5
|
158
|
+
# Offense count: 1
|
114
159
|
# Cop supports --auto-correct.
|
115
160
|
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
|
161
|
+
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
|
116
162
|
Style/TrivialAccessors:
|
117
|
-
|
163
|
+
Exclude:
|
164
|
+
- 'lib/restforce/middleware.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,122 @@
|
|
1
|
+
## 5.1.1 (Oct 13, 2021)
|
2
|
+
|
3
|
+
* Handle the `INVALID_REPLICATION_DATE` error returned by Salesforce (@michaelwnyc)
|
4
|
+
* Handle the `BIG_OBJECT_UNSUPPORTED_OPERATION` error returned by Salesforce (@remon)
|
5
|
+
|
6
|
+
## 5.1.0 (Aug 26, 2021)
|
7
|
+
|
8
|
+
* Add official support for Ruby 3.0 (@timrogers)
|
9
|
+
* Drop support for Ruby 2.5, which has reached end-of-life (@timrogers)
|
10
|
+
* Handle the `QUERY_TIMEOUT` error returned by Salesforce (@timrogers)
|
11
|
+
* Remove unnecessary development dependencies for the gem, which can just be in the project's `Gemfile` (@timrogers)
|
12
|
+
|
13
|
+
## 5.0.6 (Jun 17, 2021)
|
14
|
+
|
15
|
+
* Handle the `API_DISABLED_FOR_ORG` error returned by Salesforce (@cmac)
|
16
|
+
* Handle the `METHOD_NOT_ALLOWED` error returned by Salesforce (@timrogers)
|
17
|
+
* Handle the `APEX_ERROR` error returned by Salesforce (@timrogers)
|
18
|
+
|
19
|
+
## 5.0.5 (Feb 17, 2021)
|
20
|
+
|
21
|
+
* Handle the `CANNOT_EXECUTE_FLOW_TRIGGER` error returned by Salesforce (@almusavi, @timrogers)
|
22
|
+
|
23
|
+
## 5.0.4 (Jan 18, 2021)
|
24
|
+
|
25
|
+
* Handle the `INVALID_QUERY_LOCATOR` error returned by Salesforce
|
26
|
+
* Handle the `INVALID_OPERATION_WITH_EXPIRED_PASSWORD` error returned by Salesforce
|
27
|
+
* Handle the `FIELD_INTEGRITY_EXCEPTION` error returned by Salesforce
|
28
|
+
* Handle the `FORBIDDEN` error returned by Salesforce
|
29
|
+
* Handle the `ILLEGAL_QUERY_PARAMETER_VALUE` error returned by Salesforce
|
30
|
+
* Handle the `JSON_PARSER_ERROR` error returned by Salesforce
|
31
|
+
|
32
|
+
## 5.0.3 (Sep 8, 2020)
|
33
|
+
|
34
|
+
* Handle the undocumented `EXCEEDED_MAX_SEMIJOIN_SUBSELECTS` error returned by Salesforce (@embertel, @timrogers)
|
35
|
+
|
36
|
+
## 5.0.2 (Sep 6, 2020)
|
37
|
+
|
38
|
+
* Handle the undocumented `REQUEST_LIMIT_EXCEEDED` error returned by Salesforce (@wkirkby, @timrogers)
|
39
|
+
* Handle the undocumented `SERVER_UNAVAILABLE` error returned by Salesforce (@wkirkby, @timrogers)
|
40
|
+
* Refactor the library to be compatible with Rubocop 0.90's cops (this shouldn't introduce any noticeable changes see #569 for detailed changes) (@timrogers)
|
41
|
+
|
42
|
+
## 5.0.1 (Aug 13, 2020)
|
43
|
+
|
44
|
+
* Handle the undocumented `API_CURRENTLY_DISABLED` error returned by Salesforce (@ruipserra, @timrogers)
|
45
|
+
* Handle the undocumented `MALFORMED_QUERY` error returned by Salesforce (@scottserok, @timrogers)
|
46
|
+
* Handle the undocumented `INVALID_QUERY_FILTER_OPERATOR` error returned by Salesforce (@Dantemss, @timrogers)
|
47
|
+
* Add documentation and scripts for running the
|
48
|
+
library's tests using Docker (@ryansch)
|
49
|
+
|
50
|
+
## 5.0.0 (Jul 10, 2020)
|
51
|
+
|
52
|
+
For instructions on upgrading from Restforce 4.x to 5.x, see our ["Upgrading from Restforce 4.x to 5.x"](https://github.com/restforce/restforce/blob/master/UPGRADING.md) guide.
|
53
|
+
|
54
|
+
### Breaking changes
|
55
|
+
|
56
|
+
* __⚠️ Define exception classes for Salesforce errors up-front instead of dynamically at runtime__, *running the risk that we might miss some errors which should be defined*. If any errors are missed, they will be added in patch versions (e.g. `5.0.1`). For more details on this change, see the ["Upgrading from Restforce 4.x to 5.x"](https://github.com/restforce/restforce/blob/master/UPGRADING.md) guide (@presidentbeef, @timrogers).
|
57
|
+
* __⚠️ Deprecate support for Ruby 2.4__, since [Ruby 2.4 reached its end-of-life](https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/) in April 2020 (@timrogers)
|
58
|
+
* __⚠️ Change the ancestry of `Restforce::UnauthorizedError` so it inherits from `Faraday::ClientError`, not `Restforce::Error`__. This breaking change was required to expose the response body returned by the API as part of this error - see the non-breaking changes entry below for further details (@michaldbianchi).
|
59
|
+
|
60
|
+
### Non-breaking changes
|
61
|
+
|
62
|
+
* Add support for `lostisland/faraday` v1.x, whilst maintaining support for v0.9.x (@ryansch)
|
63
|
+
* Add `#empty?` method to `Restforce::Collection`, returning whether they are any items in a collection (@bubaflub)
|
64
|
+
* Allow opting-in to caching on a per-call basis with `Restforce::Client#with_caching` (@swaincreates)
|
65
|
+
* Expose the response body from Salesforce on `Restforce::UnauthorizedError` and `Restforce::NotFoundError` (@michaeldbianchi)
|
66
|
+
* Remove the unnecessary depending on the `json` gem, which has been part of the Ruby standard library since v1.9 (@vonTronje)
|
67
|
+
|
68
|
+
|
69
|
+
## 4.2.2 (Jan 23, 2020)
|
70
|
+
|
71
|
+
* Fix `NoMethodError: undefined method '[]' for nil:NilClass` error when generating objects to return (@apurkiss)
|
72
|
+
|
73
|
+
## 4.2.1 (Dec 4, 2019)
|
74
|
+
|
75
|
+
* Handle empty response bodies returned with authentication errors (@sylvandor)
|
76
|
+
* Fix Faraday deprecation warning in newer Faraday versions (`v0.17.1` onwards) caused by inheriting from a deprecated class
|
77
|
+
|
78
|
+
## 4.2.0 (Oct 23, 2019)
|
79
|
+
|
80
|
+
* Add support for platform events, CDC, generic events, etc. in the Streaming API (@nathanKramer)
|
81
|
+
|
82
|
+
## 4.1.0 (Oct 20, 2019)
|
83
|
+
|
84
|
+
* Add support for JWT authentication (@nathanKramer, @tagCincy)
|
85
|
+
|
86
|
+
## 4.0.0 (Oct 9, 2019)
|
87
|
+
|
88
|
+
* __Deprecate support for Ruby 2.3__, since [Ruby 2.3 reached its end-of-life](https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/) in March 2019. (This is the only breaking change included in this version.)
|
89
|
+
|
90
|
+
## 3.2.0 (Oct 9, 2019)
|
91
|
+
|
92
|
+
* Add support for the Batch API (@gaiottino, @teoulas)
|
93
|
+
* Return specific exceptions for errors that might be returned from Salesforce.com - instead of getting a generic `Faraday::Error::ClientError`, you might get something like a `Restforce::EntityTooLargeError` (@boblail)
|
94
|
+
* Expose the full response in exceptions' messages to make debugging easier (@boblail)
|
95
|
+
* Properly escape IDs with spaces in them when working with existing records (@pushups)
|
96
|
+
|
97
|
+
## 3.1.0 (Aug 16, 2018)
|
98
|
+
|
99
|
+
* Add support for replaying missed messages when using the Salesforce Streaming API (@andreimaxim, @drteeth, @panozzaj)
|
100
|
+
|
1
101
|
## 3.0.1 (Aug 4, 2018)
|
2
102
|
|
3
103
|
* Fix `NoMethodError` when upserting an existing record (@opti)
|
4
104
|
|
5
105
|
## 3.0.0 (Aug 2, 2018)
|
6
106
|
|
7
|
-
* __Deprecate support for Ruby 2.0, 2.1 and 2.2__, since [even Ruby 2.2 reached its end-of-life]
|
107
|
+
* __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.)
|
8
108
|
* Fix `NoMethodError` when trying to upsert a record using a `Fixnum` as the external ID (@AlexandruCD)
|
9
109
|
* Escape record IDs passed in to the client to identify records to find, delete, etc. (@jmdx)
|
10
110
|
* 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)
|
11
111
|
* Fix `get_updated` and `get_deleted` API calls by removing the erroneous leading forward slash from the path (@scottolsen)
|
12
112
|
* Fix unpacking of dependent picklist options (@parkm)
|
13
113
|
|
114
|
+
## 2.5.4 (May 15, 2019)
|
115
|
+
|
116
|
+
See the [`v2`](https://github.com/restforce/restforce/tree/v2) branch for this release.
|
117
|
+
|
118
|
+
* Escape record IDs passed in to the client to identify records to find, delete, etc. (@jmdx, @apanzerj)
|
119
|
+
|
14
120
|
## 2.5.3 (Apr 25, 2017)
|
15
121
|
|
16
122
|
* Raise an error where a custom external ID field name is supplied to `upsert` and `upsert!`, but it is missing from the provided attributes (@velveret)
|
data/CONTRIBUTING.md
CHANGED
@@ -34,4 +34,24 @@ Some things that will increase the chance that your pull request is accepted:
|
|
34
34
|
* Write tests.
|
35
35
|
* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
36
36
|
|
37
|
-
*Adapted from [
|
37
|
+
*Adapted from [factory_bot_rails's CONTRIBUTING.md](https://github.com/thoughtbot/factory_bot_rails/blob/master/CONTRIBUTING.md).*
|
38
|
+
|
39
|
+
## Docker
|
40
|
+
|
41
|
+
If you'd rather use a docker container to run the tests, you can use the following instructions.
|
42
|
+
|
43
|
+
To set up the container image:
|
44
|
+
|
45
|
+
`docker-compose build --pull`
|
46
|
+
|
47
|
+
To run specs:
|
48
|
+
|
49
|
+
`docker-compose run --rm restforce rspec`
|
50
|
+
|
51
|
+
To run rubocop:
|
52
|
+
|
53
|
+
`docker-compose run --rm restforce rubocop`
|
54
|
+
|
55
|
+
To reset the bundler cache:
|
56
|
+
|
57
|
+
`docker-compose down -v`
|
data/Dockerfile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
FROM ruby:2.6.5-alpine
|
2
|
+
|
3
|
+
RUN apk add --no-cache \
|
4
|
+
ca-certificates \
|
5
|
+
wget \
|
6
|
+
openssl \
|
7
|
+
bash \
|
8
|
+
build-base \
|
9
|
+
git \
|
10
|
+
sqlite-dev \
|
11
|
+
tzdata \
|
12
|
+
tini
|
13
|
+
|
14
|
+
ENV LANG en_US.UTF-8
|
15
|
+
ENV LANGUAGE en_US:en
|
16
|
+
ENV LC_ALL en_US.UTF-8
|
17
|
+
|
18
|
+
ENV BUNDLER_VERSION 2.1.4
|
19
|
+
RUN gem install bundler -v ${BUNDLER_VERSION} -i /usr/local/lib/ruby/gems/$(ls /usr/local/lib/ruby/gems) --force
|
20
|
+
|
21
|
+
WORKDIR /srv
|
22
|
+
|
23
|
+
COPY Gemfile restforce.gemspec /srv/
|
24
|
+
COPY lib/restforce/version.rb /srv/lib/restforce/version.rb
|
25
|
+
|
26
|
+
RUN bundle install
|
27
|
+
|
28
|
+
COPY . /srv/
|
29
|
+
|
30
|
+
ENTRYPOINT ["/sbin/tini", "-g", "--", "bundle", "exec"]
|
31
|
+
CMD ["rspec"]
|
data/Gemfile
CHANGED
@@ -3,11 +3,15 @@
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem '
|
6
|
+
gem 'faye' unless RUBY_PLATFORM == 'java'
|
7
|
+
gem 'guard-rspec'
|
8
|
+
gem 'guard-rubocop'
|
7
9
|
gem 'jruby-openssl', platforms: :jruby
|
8
10
|
gem 'rake'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
gem 'rspec', '~> 3.10.0'
|
12
|
+
gem 'rspec-collection_matchers', '~> 1.2.0'
|
13
|
+
gem 'rspec-its', '~> 1.3.0'
|
14
|
+
gem 'rspec_junit_formatter', '~> 0.4.1'
|
15
|
+
gem 'rubocop', '~> 1.22.1'
|
16
|
+
gem 'simplecov', '~> 0.21.2'
|
17
|
+
gem 'webmock', '~> 3.14.0'
|