restforce 7.2.0 → 7.3.0

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: 32f18ed324e748a4cc4b9b6178db20373ddcc219d44c3a98baccfbb50e29c1d5
4
- data.tar.gz: a9fbbc98cb0c0929f561e8730bfef4913eca9994a489d337c6e67359bcaa9040
3
+ metadata.gz: 6654e481c857ecb9ac254b03727287038371662899d1ef0a136c49c1cd5e86d6
4
+ data.tar.gz: 5a78a982b7bc65c3332320682d44bc7f2a46a234b9afc5360bca79fa0c8eddeb
5
5
  SHA512:
6
- metadata.gz: 3a26f9c8ccc4c846af46fe3019679afdfb1a82d6ca94979d8d6e119bf87681abd73b15ca1fd6f32d1ad1ce663b8b69d31f0d64d38451c15378cc45c0b99022ef
7
- data.tar.gz: cab7aac0506a7963a0b1a4cf56e257c0b09ff7cb15f0e17491cb57d18e2797b676c1463470052fecf4ea3d93645b71780d6318ee59c3306fb2c268da7a15a462
6
+ metadata.gz: 62fdf7157d265d3d8af5b37ecec52a98f1462a1dcc62e72471b2ddb29380821a90b0e38cb5cd111dc4b925182af169bda56f131e0798277e1f2c55f1132ec5d8
7
+ data.tar.gz: a62df632fca2528e5dd991dbf4ab95f5cb7cc201819dbfeed5dfb4d021bdf47b567a10eda7ed9cc2e7436acbf89951cd7f85e0d57bd421438a7b9870aa2ed8fb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 7.3.0 (Feb 14, 2024 🧡)
2
+
3
+ - Add support for making `GET` requests using the Composite API (@shravan097)
4
+
1
5
  # 7.2.0 (Jan 23, 2024)
2
6
 
3
7
  - Add support for `faraday` v2.9.x (@timrogers)
data/Gemfile CHANGED
@@ -13,10 +13,10 @@ gem 'guard-rspec'
13
13
  gem 'guard-rubocop'
14
14
  gem 'jruby-openssl', platforms: :jruby
15
15
  gem 'rake'
16
- gem 'rspec', '~> 3.12.0'
16
+ gem 'rspec', '~> 3.13.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
20
  gem 'rubocop', '~> 1.60.1'
21
21
  gem 'simplecov', '~> 0.22.0'
22
- gem 'webmock', '~> 3.19.1'
22
+ gem 'webmock', '~> 3.20.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', '~> 7.2.0'
30
+ gem 'restforce', '~> 7.3.0'
31
31
 
32
32
  And then execute:
33
33
 
@@ -600,7 +600,6 @@ This feature permits the user to send a composite object—that is, a complex
600
600
  object with nested children—in a single API call. Up to 25 requests may be
601
601
  included in a single composite.
602
602
 
603
- Note that `GET` is not yet implemented for this API.
604
603
 
605
604
  ```ruby
606
605
  # build up an array of requests:
@@ -93,6 +93,14 @@ module Restforce
93
93
  }
94
94
  end
95
95
 
96
+ def find(sobject, reference_id, id)
97
+ requests << {
98
+ method: 'GET',
99
+ url: composite_api_path("#{sobject}/#{id}"),
100
+ referenceId: reference_id
101
+ }
102
+ end
103
+
96
104
  private
97
105
 
98
106
  def composite_api_path(path)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '7.2.0'
4
+ VERSION = '7.3.0'
5
5
  end
@@ -82,6 +82,23 @@ describe Restforce::Concerns::CompositeAPI do
82
82
  end
83
83
  end
84
84
 
85
+ it '#find' do
86
+ client.
87
+ should_receive(:api_post).
88
+ with(endpoint, { compositeRequest: [
89
+ {
90
+ method: 'GET',
91
+ url: "/services/data/v38.0/sobjects/Object/00312345",
92
+ referenceId: 'find_ref'
93
+ }
94
+ ], allOrNone: all_or_none, collateSubrequests: false }.to_json).
95
+ and_return(response)
96
+
97
+ client.send(method) do |subrequests|
98
+ subrequests.find('Object', 'find_ref', '00312345')
99
+ end
100
+ end
101
+
85
102
  it 'multiple subrequests' do
86
103
  client.
87
104
  should_receive(:api_post).
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: 7.2.0
4
+ version: 7.3.0
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: 2024-01-23 00:00:00.000000000 Z
12
+ date: 2024-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday