restforce 5.2.2 → 5.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +8 -3
- data/CHANGELOG.md +6 -0
- data/Gemfile +2 -2
- data/README.md +1 -1
- data/lib/restforce/concerns/base.rb +2 -2
- data/lib/restforce/concerns/composite_api.rb +4 -4
- data/lib/restforce/version.rb +1 -1
- data/restforce.gemspec +1 -1
- data/spec/unit/concerns/composite_api_spec.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a41bb3b7f6f9c7fc06a71266e685e82afae4d6e291553159a6909ed29485553
|
4
|
+
data.tar.gz: b7e01b436eafbd7be80dc4210fce034ff8ae08b4920241c84999b252d34501d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b465fc051f6199309d6bf7c18328b6765a8c08fb24daf28e978bd478602a2b6988dbd3578c3cc6562d2b5066666fdb9ddb64b4bd9a73fe9297d5dc3a073388ca
|
7
|
+
data.tar.gz: b1cc8939cb52563e39959bf2df3b27d91f64dba0fc7b5afd1d80fea47a4cdc55b5c921a9eaeef39ba97923037cd9ef0a873e3eed96dca0e50581f73d6ab66f06
|
data/.circleci/config.yml
CHANGED
@@ -34,23 +34,28 @@ references:
|
|
34
34
|
destination: test-results
|
35
35
|
|
36
36
|
jobs:
|
37
|
+
build-ruby31:
|
38
|
+
docker:
|
39
|
+
- image: cimg/ruby:3.1
|
40
|
+
steps: *steps
|
37
41
|
build-ruby30:
|
38
42
|
docker:
|
39
|
-
- image:
|
43
|
+
- image: cimg/ruby:3.0
|
40
44
|
steps: *steps
|
41
45
|
build-ruby27:
|
42
46
|
docker:
|
43
|
-
- image:
|
47
|
+
- image: cimg/ruby:2.7
|
44
48
|
steps: *steps
|
45
49
|
build-ruby26:
|
46
50
|
docker:
|
47
|
-
- image:
|
51
|
+
- image: cimg/ruby:2.6
|
48
52
|
steps: *steps
|
49
53
|
|
50
54
|
workflows:
|
51
55
|
version: 2
|
52
56
|
tests:
|
53
57
|
jobs:
|
58
|
+
- build-ruby31
|
54
59
|
- build-ruby30
|
55
60
|
- build-ruby27
|
56
61
|
- build-ruby26
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 5.2.3 (Jan 17, 2022)
|
2
|
+
|
3
|
+
* Add official support for Ruby 3.1 (@timrogers)
|
4
|
+
* Fix handling of responses from the Composite API (@robob27)
|
5
|
+
* Fix dependencies to correctly declare that the gem doesn't work with [faraday](https://github.com/lostisland/faraday) `v1.9.0` or later (@timrogers)
|
6
|
+
|
1
7
|
# 5.2.2 (Dec 16, 2021)
|
2
8
|
|
3
9
|
* Handle the `MALFORMED_SEARCH` error returned by Salesforce (@timrogers)
|
data/Gemfile
CHANGED
@@ -11,7 +11,7 @@ gem 'rake'
|
|
11
11
|
gem 'rspec', '~> 3.10.0'
|
12
12
|
gem 'rspec-collection_matchers', '~> 1.2.0'
|
13
13
|
gem 'rspec-its', '~> 1.3.0'
|
14
|
-
gem 'rspec_junit_formatter', '~> 0.
|
15
|
-
gem 'rubocop', '~> 1.
|
14
|
+
gem 'rspec_junit_formatter', '~> 0.5.1'
|
15
|
+
gem 'rubocop', '~> 1.24.1'
|
16
16
|
gem 'simplecov', '~> 0.21.2'
|
17
17
|
gem 'webmock', '~> 3.14.0'
|
data/README.md
CHANGED
@@ -61,9 +61,9 @@ module Restforce
|
|
61
61
|
def initialize(opts = {})
|
62
62
|
raise ArgumentError, 'Please specify a hash of options' unless opts.is_a?(Hash)
|
63
63
|
|
64
|
-
@options = Restforce.configuration.options.
|
64
|
+
@options = Restforce.configuration.options.to_h do |option|
|
65
65
|
[option, Restforce.configuration.send(option)]
|
66
|
-
end
|
66
|
+
end
|
67
67
|
|
68
68
|
@options.merge! opts
|
69
69
|
yield builder if block_given?
|
@@ -24,12 +24,12 @@ module Restforce
|
|
24
24
|
}
|
25
25
|
response = api_post('composite', properties.to_json)
|
26
26
|
|
27
|
-
results = response.body['
|
28
|
-
has_errors = results.any? { |result| result['
|
27
|
+
results = response.body['compositeResponse']
|
28
|
+
has_errors = results.any? { |result| result['httpStatusCode'].digits.last == 4 }
|
29
29
|
if all_or_none && has_errors
|
30
|
-
last_error_index = results.rindex { |result| result['
|
30
|
+
last_error_index = results.rindex { |result| result['httpStatusCode'] != 412 }
|
31
31
|
last_error = results[last_error_index]
|
32
|
-
raise CompositeAPIError, last_error['
|
32
|
+
raise CompositeAPIError, last_error['body'][0]['errorCode']
|
33
33
|
end
|
34
34
|
|
35
35
|
results
|
data/lib/restforce/version.rb
CHANGED
data/restforce.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |gem|
|
|
25
25
|
|
26
26
|
gem.required_ruby_version = '>= 2.6'
|
27
27
|
|
28
|
-
gem.add_dependency 'faraday', '
|
28
|
+
gem.add_dependency 'faraday', '< 1.9.0', '>= 0.9.0'
|
29
29
|
gem.add_dependency 'faraday_middleware', ['>= 0.8.8', '<= 2.0']
|
30
30
|
gem.add_dependency 'hashie', '>= 1.2.0', '< 6.0'
|
31
31
|
gem.add_dependency 'jwt', ['>= 1.5.6']
|
@@ -128,7 +128,7 @@ describe Restforce::Concerns::CompositeAPI do
|
|
128
128
|
describe '#composite' do
|
129
129
|
let(:method) { :composite }
|
130
130
|
let(:all_or_none) { false }
|
131
|
-
let(:response) { double('Faraday::Response', body: { '
|
131
|
+
let(:response) { double('Faraday::Response', body: { 'compositeResponse' => [] }) }
|
132
132
|
it_behaves_like 'composite requests'
|
133
133
|
end
|
134
134
|
|
@@ -136,7 +136,7 @@ describe Restforce::Concerns::CompositeAPI do
|
|
136
136
|
let(:method) { :composite! }
|
137
137
|
let(:all_or_none) { true }
|
138
138
|
let(:response) do
|
139
|
-
double('Faraday::Response', body: { '
|
139
|
+
double('Faraday::Response', body: { 'compositeResponse' => [] })
|
140
140
|
end
|
141
141
|
it_behaves_like 'composite requests'
|
142
142
|
end
|
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: 5.2.
|
4
|
+
version: 5.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Rogers
|
@@ -9,15 +9,15 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "<"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 1.9.0
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 0.9.0
|
@@ -25,9 +25,9 @@ dependencies:
|
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- - "
|
28
|
+
- - "<"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: 1.9.0
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.9.0
|