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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc09f4586a150366a59119a46d6ccee41a72f6b63efa96224e7fe9bb31a65574
4
- data.tar.gz: 71c415929a9ecb427cf528fbb1ac57630cb503cdad2ecd2b17769f1000b174dd
3
+ metadata.gz: 1a41bb3b7f6f9c7fc06a71266e685e82afae4d6e291553159a6909ed29485553
4
+ data.tar.gz: b7e01b436eafbd7be80dc4210fce034ff8ae08b4920241c84999b252d34501d2
5
5
  SHA512:
6
- metadata.gz: ac1bd7610aec45c963fad5feac34f0f4bc0bd847bbd80bc4b2ad7895cf7a0ee35d68904419ffb5ea2b74d205a7897a06558e7661d1e03c9ed00644438047b87b
7
- data.tar.gz: c3107f9a4a125e1fb89f107477eab41379a4347fce3689204e1d2dd3817a7cf0c465cfabdb25cf01246cfe428719147b7ccbba73b330d4211856712fb744a6a0
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: circleci/ruby:3.0
43
+ - image: cimg/ruby:3.0
40
44
  steps: *steps
41
45
  build-ruby27:
42
46
  docker:
43
- - image: circleci/ruby:2.7
47
+ - image: cimg/ruby:2.7
44
48
  steps: *steps
45
49
  build-ruby26:
46
50
  docker:
47
- - image: circleci/ruby:2.6
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.4.1'
15
- gem 'rubocop', '~> 1.23.0'
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
@@ -27,7 +27,7 @@ Features include:
27
27
 
28
28
  Add this line to your application's Gemfile:
29
29
 
30
- gem 'restforce', '~> 5.2.2'
30
+ gem 'restforce', '~> 5.2.3'
31
31
 
32
32
  And then execute:
33
33
 
@@ -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.map do |option|
64
+ @options = Restforce.configuration.options.to_h do |option|
65
65
  [option, Restforce.configuration.send(option)]
66
- end.to_h
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['CompositeResponse']
28
- has_errors = results.any? { |result| result['HttpStatusCode'].digits.last == 4 }
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['HttpStatusCode'] != 412 }
30
+ last_error_index = results.rindex { |result| result['httpStatusCode'] != 412 }
31
31
  last_error = results[last_error_index]
32
- raise CompositeAPIError, last_error['Body'][0]['errorCode']
32
+ raise CompositeAPIError, last_error['body'][0]['errorCode']
33
33
  end
34
34
 
35
35
  results
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '5.2.2'
4
+ VERSION = '5.2.3'
5
5
  end
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', '<= 2.0', '>= 0.9.0'
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: { 'CompositeResponse' => [] }) }
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: { 'CompositeResponse' => [] })
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.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: 2021-12-16 00:00:00.000000000 Z
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: '2.0'
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: '2.0'
30
+ version: 1.9.0
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.9.0