restforce 6.0.0 → 8.0.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 +4 -4
- data/.github/workflows/build.yml +3 -3
- data/.github/workflows/faraday.yml +31 -3
- data/.gitignore +4 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +74 -0
- data/Gemfile +8 -8
- data/README.md +41 -23
- data/UPGRADING.md +24 -0
- data/lib/restforce/collection.rb +2 -2
- data/lib/restforce/concerns/authentication.rb +8 -0
- data/lib/restforce/concerns/base.rb +5 -0
- data/lib/restforce/concerns/batch_api.rb +2 -2
- data/lib/restforce/concerns/composite_api.rb +9 -1
- data/lib/restforce/concerns/connection.rb +10 -3
- data/lib/restforce/concerns/picklists.rb +1 -1
- data/lib/restforce/concerns/streaming.rb +4 -4
- data/lib/restforce/config.rb +6 -2
- data/lib/restforce/error_code.rb +23 -1
- data/lib/restforce/file_part.rb +3 -1
- data/lib/restforce/mash.rb +2 -2
- data/lib/restforce/middleware/authentication/client_credential.rb +15 -0
- data/lib/restforce/middleware/authentication.rb +2 -1
- data/lib/restforce/middleware/gzip.rb +5 -0
- data/lib/restforce/middleware/json_request.rb +2 -2
- data/lib/restforce/middleware/json_response.rb +1 -1
- data/lib/restforce/middleware/raise_error.rb +1 -1
- data/lib/restforce/patches/parts.rb +2 -0
- data/lib/restforce/version.rb +1 -1
- data/lib/restforce.rb +1 -1
- data/restforce.gemspec +4 -4
- data/spec/integration/abstract_client_spec.rb +6 -3
- data/spec/unit/concerns/authentication_spec.rb +33 -0
- data/spec/unit/concerns/base_spec.rb +1 -1
- data/spec/unit/concerns/composite_api_spec.rb +43 -0
- data/spec/unit/concerns/connection_spec.rb +3 -1
- data/spec/unit/config_spec.rb +28 -1
- data/spec/unit/middleware/authentication/client_credential_spec.rb +36 -0
- data/spec/unit/middleware/authentication_spec.rb +3 -3
- data/spec/unit/middleware/authorization_spec.rb +5 -1
- data/spec/unit/middleware/custom_headers_spec.rb +6 -2
- data/spec/unit/middleware/gzip_spec.rb +60 -14
- data/spec/unit/middleware/instance_url_spec.rb +2 -2
- data/spec/unit/middleware/logger_spec.rb +1 -1
- data/spec/unit/sobject_spec.rb +9 -5
- metadata +12 -19
|
@@ -11,7 +11,7 @@ describe Restforce::Middleware::InstanceURL do
|
|
|
11
11
|
client.stub_chain :connection, url_prefix: URI.parse('http:/')
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
it {
|
|
14
|
+
it { expect { subject.call }.to raise_error Restforce::UnauthorizedError }
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
context 'when the instance url is set' do
|
|
@@ -20,7 +20,7 @@ describe Restforce::Middleware::InstanceURL do
|
|
|
20
20
|
app.should_receive(:call).once
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
it {
|
|
23
|
+
it { expect { subject.call }.not_to raise_error }
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
data/spec/unit/sobject_spec.rb
CHANGED
|
@@ -48,7 +48,11 @@ describe Restforce::SObject do
|
|
|
48
48
|
subject(:send_method) { lambda { sobject.send(method) } }
|
|
49
49
|
|
|
50
50
|
context 'when an Id was not queried' do
|
|
51
|
-
it {
|
|
51
|
+
it {
|
|
52
|
+
expect do
|
|
53
|
+
subject.call
|
|
54
|
+
end.to raise_error ArgumentError, /need to query the Id for the record/
|
|
55
|
+
}
|
|
52
56
|
end
|
|
53
57
|
|
|
54
58
|
context 'when an Id is present' do
|
|
@@ -57,7 +61,7 @@ describe Restforce::SObject do
|
|
|
57
61
|
client.should_receive(receiver)
|
|
58
62
|
end
|
|
59
63
|
|
|
60
|
-
it {
|
|
64
|
+
it { expect { subject.call }.not_to raise_error }
|
|
61
65
|
end
|
|
62
66
|
end
|
|
63
67
|
end
|
|
@@ -69,7 +73,7 @@ describe Restforce::SObject do
|
|
|
69
73
|
client.should_receive(:describe).with('Whizbang')
|
|
70
74
|
end
|
|
71
75
|
|
|
72
|
-
it {
|
|
76
|
+
it { expect { subject.call }.not_to raise_error }
|
|
73
77
|
end
|
|
74
78
|
|
|
75
79
|
describe '.describe_layouts' do
|
|
@@ -80,13 +84,13 @@ describe Restforce::SObject do
|
|
|
80
84
|
client.should_receive(:describe_layouts).with('Whizbang', layout_id)
|
|
81
85
|
end
|
|
82
86
|
|
|
83
|
-
it {
|
|
87
|
+
it { expect { subject.call }.not_to raise_error }
|
|
84
88
|
|
|
85
89
|
context 'when a layout Id is specified' do
|
|
86
90
|
let(:layout_id) { '012E0000000RHEp' }
|
|
87
91
|
subject { lambda { sobject.describe_layouts(layout_id) } }
|
|
88
92
|
|
|
89
|
-
it {
|
|
93
|
+
it { expect { subject.call }.not_to raise_error }
|
|
90
94
|
end
|
|
91
95
|
end
|
|
92
96
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: restforce
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Rogers
|
|
8
8
|
- Eric J. Holmes
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: faraday
|
|
@@ -17,7 +16,7 @@ dependencies:
|
|
|
17
16
|
requirements:
|
|
18
17
|
- - "<"
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
20
|
-
version:
|
|
19
|
+
version: 3.0.0
|
|
21
20
|
- - ">="
|
|
22
21
|
- !ruby/object:Gem::Version
|
|
23
22
|
version: 1.1.0
|
|
@@ -27,7 +26,7 @@ dependencies:
|
|
|
27
26
|
requirements:
|
|
28
27
|
- - "<"
|
|
29
28
|
- !ruby/object:Gem::Version
|
|
30
|
-
version:
|
|
29
|
+
version: 3.0.0
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
32
|
version: 1.1.0
|
|
@@ -35,22 +34,16 @@ dependencies:
|
|
|
35
34
|
name: faraday-follow_redirects
|
|
36
35
|
requirement: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
|
-
- - "<="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.3.0
|
|
41
37
|
- - "<"
|
|
42
38
|
- !ruby/object:Gem::Version
|
|
43
|
-
version:
|
|
39
|
+
version: 0.6.0
|
|
44
40
|
type: :runtime
|
|
45
41
|
prerelease: false
|
|
46
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
47
43
|
requirements:
|
|
48
|
-
- - "<="
|
|
49
|
-
- !ruby/object:Gem::Version
|
|
50
|
-
version: 0.3.0
|
|
51
44
|
- - "<"
|
|
52
45
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
46
|
+
version: 0.6.0
|
|
54
47
|
- !ruby/object:Gem::Dependency
|
|
55
48
|
name: faraday-multipart
|
|
56
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -77,14 +70,14 @@ dependencies:
|
|
|
77
70
|
requirements:
|
|
78
71
|
- - "<"
|
|
79
72
|
- !ruby/object:Gem::Version
|
|
80
|
-
version:
|
|
73
|
+
version: 4.0.0
|
|
81
74
|
type: :runtime
|
|
82
75
|
prerelease: false
|
|
83
76
|
version_requirements: !ruby/object:Gem::Requirement
|
|
84
77
|
requirements:
|
|
85
78
|
- - "<"
|
|
86
79
|
- !ruby/object:Gem::Version
|
|
87
|
-
version:
|
|
80
|
+
version: 4.0.0
|
|
88
81
|
- !ruby/object:Gem::Dependency
|
|
89
82
|
name: hashie
|
|
90
83
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,6 +163,7 @@ files:
|
|
|
170
163
|
- lib/restforce/mash.rb
|
|
171
164
|
- lib/restforce/middleware.rb
|
|
172
165
|
- lib/restforce/middleware/authentication.rb
|
|
166
|
+
- lib/restforce/middleware/authentication/client_credential.rb
|
|
173
167
|
- lib/restforce/middleware/authentication/jwt_bearer.rb
|
|
174
168
|
- lib/restforce/middleware/authentication/password.rb
|
|
175
169
|
- lib/restforce/middleware/authentication/token.rb
|
|
@@ -257,6 +251,7 @@ files:
|
|
|
257
251
|
- spec/unit/document_spec.rb
|
|
258
252
|
- spec/unit/error_code_spec.rb
|
|
259
253
|
- spec/unit/mash_spec.rb
|
|
254
|
+
- spec/unit/middleware/authentication/client_credential_spec.rb
|
|
260
255
|
- spec/unit/middleware/authentication/jwt_bearer_spec.rb
|
|
261
256
|
- spec/unit/middleware/authentication/password_spec.rb
|
|
262
257
|
- spec/unit/middleware/authentication/token_spec.rb
|
|
@@ -278,7 +273,6 @@ metadata:
|
|
|
278
273
|
source_code_uri: https://github.com/restforce/restforce
|
|
279
274
|
changelog_uri: https://github.com/restforce/restforce/blob/master/CHANGELOG.md
|
|
280
275
|
rubygems_mfa_required: 'true'
|
|
281
|
-
post_install_message:
|
|
282
276
|
rdoc_options: []
|
|
283
277
|
require_paths:
|
|
284
278
|
- lib
|
|
@@ -286,15 +280,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
286
280
|
requirements:
|
|
287
281
|
- - ">="
|
|
288
282
|
- !ruby/object:Gem::Version
|
|
289
|
-
version: '
|
|
283
|
+
version: '3.1'
|
|
290
284
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
291
285
|
requirements:
|
|
292
286
|
- - ">="
|
|
293
287
|
- !ruby/object:Gem::Version
|
|
294
288
|
version: '0'
|
|
295
289
|
requirements: []
|
|
296
|
-
rubygems_version: 3.
|
|
297
|
-
signing_key:
|
|
290
|
+
rubygems_version: 3.7.2
|
|
298
291
|
specification_version: 4
|
|
299
292
|
summary: A lightweight Ruby client for the Salesforce REST API
|
|
300
293
|
test_files: []
|