restforce 4.0.0 → 5.0.0
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 +9 -9
- data/.github/ISSUE_TEMPLATE/unhandled-salesforce-error.md +17 -0
- data/.rubocop.yml +4 -3
- data/.rubocop_todo.yml +2 -2
- data/CHANGELOG.md +36 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +1 -1
- data/README.md +71 -33
- data/UPGRADING.md +38 -0
- data/lib/restforce.rb +11 -13
- data/lib/restforce/collection.rb +5 -0
- data/lib/restforce/concerns/api.rb +1 -1
- data/lib/restforce/concerns/authentication.rb +10 -0
- data/lib/restforce/concerns/base.rb +2 -0
- data/lib/restforce/concerns/caching.rb +7 -0
- data/lib/restforce/concerns/connection.rb +3 -3
- data/lib/restforce/concerns/streaming.rb +22 -7
- data/lib/restforce/config.rb +6 -0
- data/lib/restforce/error_code.rb +406 -0
- data/lib/restforce/file_part.rb +24 -0
- data/lib/restforce/mash.rb +1 -1
- data/lib/restforce/middleware/authentication.rb +7 -3
- data/lib/restforce/middleware/authentication/jwt_bearer.rb +38 -0
- data/lib/restforce/middleware/caching.rb +1 -1
- data/lib/restforce/middleware/instance_url.rb +1 -1
- data/lib/restforce/middleware/raise_error.rb +3 -4
- data/lib/restforce/version.rb +1 -1
- data/restforce.gemspec +14 -14
- data/spec/fixtures/test_private.key +27 -0
- data/spec/integration/abstract_client_spec.rb +18 -6
- data/spec/spec_helper.rb +14 -1
- data/spec/support/fixture_helpers.rb +1 -3
- data/spec/unit/collection_spec.rb +18 -0
- data/spec/unit/concerns/api_spec.rb +1 -1
- data/spec/unit/concerns/authentication_spec.rb +35 -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 +58 -30
- 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_spec.rb +27 -4
- data/spec/unit/middleware/raise_error_spec.rb +19 -10
- data/spec/unit/signed_request_spec.rb +1 -1
- data/spec/unit/sobject_spec.rb +2 -5
- metadata +41 -31
- data/lib/restforce/upload_io.rb +0 -9
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Restforce::ErrorCode do
|
6
|
+
describe "mapping of error codes to classes" do
|
7
|
+
subject(:error_exception_classes) { described_class::ERROR_EXCEPTION_CLASSES }
|
8
|
+
|
9
|
+
let(:exception_classes) do
|
10
|
+
described_class.constants.
|
11
|
+
map { |constant_name| described_class.const_get(constant_name) }.
|
12
|
+
select { |constant| constant.is_a?(Class) }
|
13
|
+
end
|
14
|
+
|
15
|
+
it "maps all defined exception classes to an error code" do
|
16
|
+
exception_classes.each do |exception_class|
|
17
|
+
expect(error_exception_classes.values).to include(exception_class)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
it "maps all error codes to a defined exception class" do
|
22
|
+
error_exception_classes.each_value do |mapped_exception_class|
|
23
|
+
expect(exception_classes).to include(mapped_exception_class)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '.get_exception_class' do
|
29
|
+
context 'when a non-existent error code is looked up' do
|
30
|
+
let(:new_error_code) { 'ANOTHER_NEW_ERROR_CODE' }
|
31
|
+
subject { described_class.get_exception_class(new_error_code) }
|
32
|
+
|
33
|
+
it { should be Restforce::ResponseError }
|
34
|
+
|
35
|
+
it 'outputs a warning' do
|
36
|
+
expect(Warning).to receive(:warn)
|
37
|
+
subject
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'when a known error code is looked up' do
|
42
|
+
let(:existing_error_code) { "ALL_OR_NONE_OPERATION_ROLLED_BACK" }
|
43
|
+
let(:existing_error) { described_class::AllOrNoneOperationRolledBack }
|
44
|
+
|
45
|
+
subject do
|
46
|
+
described_class.get_exception_class(existing_error_code)
|
47
|
+
end
|
48
|
+
|
49
|
+
it { should < Restforce::ResponseError }
|
50
|
+
|
51
|
+
it 'returns existing error' do
|
52
|
+
should be(existing_error)
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'does not output a warning' do
|
56
|
+
expect(Warning).to_not receive(:warn)
|
57
|
+
subject
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/spec/unit/mash_spec.rb
CHANGED
@@ -33,6 +33,11 @@ describe Restforce::Mash do
|
|
33
33
|
let(:input) { { 'attributes' => { 'type' => 'Document' } } }
|
34
34
|
it { should eq Restforce::Document }
|
35
35
|
end
|
36
|
+
|
37
|
+
context 'when the attributes value is nil' do
|
38
|
+
let(:input) { { 'attributes' => nil } }
|
39
|
+
it { should eq Restforce::SObject }
|
40
|
+
end
|
36
41
|
end
|
37
42
|
|
38
43
|
context 'else' do
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
describe Restforce::Middleware::Authentication::JWTBearer do
|
5
|
+
let(:jwt_key) { File.read('spec/fixtures/test_private.key') }
|
6
|
+
|
7
|
+
let(:options) do
|
8
|
+
{ host: 'login.salesforce.com',
|
9
|
+
client_id: 'client_id',
|
10
|
+
username: 'foo',
|
11
|
+
jwt_key: jwt_key,
|
12
|
+
instance_url: 'https://na1.salesforce.com',
|
13
|
+
adapter: :net_http }
|
14
|
+
end
|
15
|
+
|
16
|
+
it_behaves_like 'authentication middleware' do
|
17
|
+
let(:success_request) do
|
18
|
+
stub_login_request(
|
19
|
+
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
20
|
+
"assertion=abc1234567890"
|
21
|
+
).to_return(status: 200, body: fixture(:auth_success_response))
|
22
|
+
end
|
23
|
+
|
24
|
+
let(:fail_request) do
|
25
|
+
stub_login_request(
|
26
|
+
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
27
|
+
"assertion=abc1234567890"
|
28
|
+
).to_return(status: 400, body: fixture(:refresh_error_response))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context 'allows jwt_key as string' do
|
33
|
+
let(:jwt_key) do
|
34
|
+
File.read('spec/fixtures/test_private.key')
|
35
|
+
end
|
36
|
+
|
37
|
+
let(:options) do
|
38
|
+
{ host: 'login.salesforce.com',
|
39
|
+
client_id: 'client_id',
|
40
|
+
username: 'foo',
|
41
|
+
jwt_key: jwt_key,
|
42
|
+
instance_url: 'https://na1.salesforce.com',
|
43
|
+
adapter: :net_http }
|
44
|
+
end
|
45
|
+
|
46
|
+
it_behaves_like 'authentication middleware' do
|
47
|
+
let(:success_request) do
|
48
|
+
stub_login_request(
|
49
|
+
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
50
|
+
"assertion=abc1234567890"
|
51
|
+
).to_return(status: 200, body: fixture(:auth_success_response))
|
52
|
+
end
|
53
|
+
|
54
|
+
let(:fail_request) do
|
55
|
+
stub_login_request(
|
56
|
+
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
57
|
+
"assertion=abc1234567890"
|
58
|
+
).to_return(status: 400, body: fixture(:refresh_error_response))
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -57,10 +57,10 @@ describe Restforce::Middleware::Authentication do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
its(:handlers) {
|
60
|
-
should include FaradayMiddleware::ParseJson
|
61
|
-
Faraday::Adapter::NetHttp
|
60
|
+
should include FaradayMiddleware::ParseJson
|
62
61
|
}
|
63
62
|
its(:handlers) { should_not include Restforce::Middleware::Logger }
|
63
|
+
its(:adapter) { should eq Faraday::Adapter::NetHttp }
|
64
64
|
end
|
65
65
|
|
66
66
|
context 'with logging enabled' do
|
@@ -70,8 +70,9 @@ describe Restforce::Middleware::Authentication do
|
|
70
70
|
|
71
71
|
its(:handlers) {
|
72
72
|
should include FaradayMiddleware::ParseJson,
|
73
|
-
Restforce::Middleware::Logger
|
73
|
+
Restforce::Middleware::Logger
|
74
74
|
}
|
75
|
+
its(:adapter) { should eq Faraday::Adapter::NetHttp }
|
75
76
|
end
|
76
77
|
|
77
78
|
context 'with specified adapter' do
|
@@ -80,8 +81,9 @@ describe Restforce::Middleware::Authentication do
|
|
80
81
|
end
|
81
82
|
|
82
83
|
its(:handlers) {
|
83
|
-
should include FaradayMiddleware::ParseJson
|
84
|
+
should include FaradayMiddleware::ParseJson
|
84
85
|
}
|
86
|
+
its(:adapter) { should eq Faraday::Adapter::Typhoeus }
|
85
87
|
end
|
86
88
|
end
|
87
89
|
|
@@ -89,4 +91,25 @@ describe Restforce::Middleware::Authentication do
|
|
89
91
|
connection.ssl[:version].should eq(:TLSv1_2)
|
90
92
|
end
|
91
93
|
end
|
94
|
+
|
95
|
+
describe '.error_message' do
|
96
|
+
context 'when response.body is present' do
|
97
|
+
let(:response) {
|
98
|
+
Faraday::Response.new(
|
99
|
+
response_body: { 'error' => 'error', 'error_description' => 'description' },
|
100
|
+
status: 401
|
101
|
+
)
|
102
|
+
}
|
103
|
+
|
104
|
+
subject { middleware.error_message(response) }
|
105
|
+
it { should eq "error: description (401)" }
|
106
|
+
end
|
107
|
+
|
108
|
+
context 'when response.body is nil' do
|
109
|
+
let(:response) { Faraday::Response.new(status: 401) }
|
110
|
+
|
111
|
+
subject { middleware.error_message(response) }
|
112
|
+
it { should eq "401" }
|
113
|
+
end
|
114
|
+
end
|
92
115
|
end
|
@@ -18,8 +18,8 @@ describe Restforce::Middleware::RaiseError do
|
|
18
18
|
'INVALID_FIELD: error_message'
|
19
19
|
end
|
20
20
|
|
21
|
-
it 'raises an error that inherits from Faraday::
|
22
|
-
expect { on_complete }.to raise_error Faraday::
|
21
|
+
it 'raises an error that inherits from Faraday::ResourceNotFound' do
|
22
|
+
expect { on_complete }.to raise_error Faraday::ResourceNotFound
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -31,8 +31,8 @@ describe Restforce::Middleware::RaiseError do
|
|
31
31
|
/300: The external ID provided/
|
32
32
|
end
|
33
33
|
|
34
|
-
it 'raises an error that inherits from Faraday::
|
35
|
-
expect { on_complete }.to raise_error Faraday::
|
34
|
+
it 'raises an error that inherits from Faraday::ClientError' do
|
35
|
+
expect { on_complete }.to raise_error Faraday::ClientError
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -44,8 +44,8 @@ describe Restforce::Middleware::RaiseError do
|
|
44
44
|
'INVALID_FIELD: error_message'
|
45
45
|
end
|
46
46
|
|
47
|
-
it 'raises an error that inherits from Faraday::
|
48
|
-
expect { on_complete }.to raise_error Faraday::
|
47
|
+
it 'raises an error that inherits from Faraday::ClientError' do
|
48
|
+
expect { on_complete }.to raise_error Faraday::ClientError
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -66,8 +66,8 @@ describe Restforce::Middleware::RaiseError do
|
|
66
66
|
'413: Request Entity Too Large'
|
67
67
|
end
|
68
68
|
|
69
|
-
it 'raises an error that inherits from Faraday::
|
70
|
-
expect { on_complete }.to raise_error Faraday::
|
69
|
+
it 'raises an error that inherits from Faraday::ClientError' do
|
70
|
+
expect { on_complete }.to raise_error Faraday::ClientError
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -80,10 +80,19 @@ describe Restforce::Middleware::RaiseError do
|
|
80
80
|
"(error code missing): #{body}"
|
81
81
|
end
|
82
82
|
|
83
|
-
it 'raises an error that inherits from Faraday::
|
84
|
-
expect { on_complete }.to raise_error Faraday::
|
83
|
+
it 'raises an error that inherits from Faraday::ClientError' do
|
84
|
+
expect { on_complete }.to raise_error Faraday::ClientError,
|
85
85
|
"(error code missing): #{body}"
|
86
86
|
end
|
87
87
|
end
|
88
|
+
|
89
|
+
context 'when error code is not already defined' do
|
90
|
+
let(:body) { { 'errorCode' => 'SOMETHING_UNDEFINED' } }
|
91
|
+
let(:status) { 400 }
|
92
|
+
|
93
|
+
it 'raises a generic Restforce::ResponseError' do
|
94
|
+
expect { on_complete }.to raise_error Restforce::ResponseError
|
95
|
+
end
|
96
|
+
end
|
88
97
|
end
|
89
98
|
end
|
data/spec/unit/sobject_spec.rb
CHANGED
@@ -45,13 +45,10 @@ describe Restforce::SObject do
|
|
45
45
|
destroy: :destroy,
|
46
46
|
destroy!: :destroy! }.each do |method, receiver|
|
47
47
|
describe ".#{method}" do
|
48
|
-
subject(:send_method) { sobject.send(method) }
|
48
|
+
subject(:send_method) { lambda { sobject.send(method) } }
|
49
49
|
|
50
50
|
context 'when an Id was not queried' do
|
51
|
-
it
|
52
|
-
expect { send_method }.to raise_error ArgumentError,
|
53
|
-
/need to query the Id for the record/
|
54
|
-
end
|
51
|
+
it { should raise_error ArgumentError, /need to query the Id for the record/ }
|
55
52
|
end
|
56
53
|
|
57
54
|
context 'when an Id is present' do
|
metadata
CHANGED
@@ -1,36 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Eric J. Holmes
|
8
7
|
- Tim Rogers
|
8
|
+
- Eric J. Holmes
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-07-10 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
|
+
- - "<="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.0'
|
18
21
|
- - ">="
|
19
22
|
- !ruby/object:Gem::Version
|
20
23
|
version: 0.9.0
|
21
|
-
- - "<="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '1.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
+
- - "<="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '2.0'
|
28
31
|
- - ">="
|
29
32
|
- !ruby/object:Gem::Version
|
30
33
|
version: 0.9.0
|
31
|
-
- - "<="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.0'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: faraday_middleware
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
version: 0.8.8
|
41
41
|
- - "<="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
43
|
+
version: '2.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -50,21 +50,21 @@ dependencies:
|
|
50
50
|
version: 0.8.8
|
51
51
|
- - "<="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '2.0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
|
-
name:
|
55
|
+
name: jwt
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
60
|
+
version: 1.5.6
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 1.
|
67
|
+
version: 1.5.6
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: hashie
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
version: 1.2.0
|
75
75
|
- - "<"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '
|
77
|
+
version: '5.0'
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -84,7 +84,7 @@ dependencies:
|
|
84
84
|
version: 1.2.0
|
85
85
|
- - "<"
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
87
|
+
version: '5.0'
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
89
|
name: faye
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,65 +119,66 @@ dependencies:
|
|
119
119
|
requirements:
|
120
120
|
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 0.
|
122
|
+
version: 0.4.1
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 0.
|
129
|
+
version: 0.4.1
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: rubocop
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 0.
|
136
|
+
version: 0.87.1
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
139
|
version_requirements: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - "~>"
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: 0.
|
143
|
+
version: 0.87.1
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
145
|
name: simplecov
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
148
|
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 0.
|
150
|
+
version: 0.18.2
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
155
|
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 0.
|
157
|
+
version: 0.18.2
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: webmock
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
162
|
- - "~>"
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 3.
|
164
|
+
version: 3.8.3
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
169
|
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version: 3.
|
172
|
-
description: A lightweight
|
171
|
+
version: 3.8.3
|
172
|
+
description: A lightweight Ruby client for the Salesforce REST API
|
173
173
|
email:
|
174
|
+
- me@timrogers.co.uk
|
174
175
|
- eric@ejholmes.net
|
175
|
-
- tim@gocardless.com
|
176
176
|
executables: []
|
177
177
|
extensions: []
|
178
178
|
extra_rdoc_files: []
|
179
179
|
files:
|
180
180
|
- ".circleci/config.yml"
|
181
|
+
- ".github/ISSUE_TEMPLATE/unhandled-salesforce-error.md"
|
181
182
|
- ".gitignore"
|
182
183
|
- ".rubocop.yml"
|
183
184
|
- ".rubocop_todo.yml"
|
@@ -189,6 +190,7 @@ files:
|
|
189
190
|
- LICENSE
|
190
191
|
- README.md
|
191
192
|
- Rakefile
|
193
|
+
- UPGRADING.md
|
192
194
|
- lib/restforce.rb
|
193
195
|
- lib/restforce/abstract_client.rb
|
194
196
|
- lib/restforce/attachment.rb
|
@@ -207,9 +209,12 @@ files:
|
|
207
209
|
- lib/restforce/config.rb
|
208
210
|
- lib/restforce/data/client.rb
|
209
211
|
- lib/restforce/document.rb
|
212
|
+
- lib/restforce/error_code.rb
|
213
|
+
- lib/restforce/file_part.rb
|
210
214
|
- lib/restforce/mash.rb
|
211
215
|
- lib/restforce/middleware.rb
|
212
216
|
- lib/restforce/middleware/authentication.rb
|
217
|
+
- lib/restforce/middleware/authentication/jwt_bearer.rb
|
213
218
|
- lib/restforce/middleware/authentication/password.rb
|
214
219
|
- lib/restforce/middleware/authentication/token.rb
|
215
220
|
- lib/restforce/middleware/authorization.rb
|
@@ -225,7 +230,6 @@ files:
|
|
225
230
|
- lib/restforce/signed_request.rb
|
226
231
|
- lib/restforce/sobject.rb
|
227
232
|
- lib/restforce/tooling/client.rb
|
228
|
-
- lib/restforce/upload_io.rb
|
229
233
|
- lib/restforce/version.rb
|
230
234
|
- restforce.gemspec
|
231
235
|
- script/bootstrap
|
@@ -266,6 +270,7 @@ files:
|
|
266
270
|
- spec/fixtures/sobject/upsert_multiple_error_response.json
|
267
271
|
- spec/fixtures/sobject/upsert_updated_success_response.json
|
268
272
|
- spec/fixtures/sobject/write_error_response.json
|
273
|
+
- spec/fixtures/test_private.key
|
269
274
|
- spec/integration/abstract_client_spec.rb
|
270
275
|
- spec/integration/data/client_spec.rb
|
271
276
|
- spec/spec_helper.rb
|
@@ -290,7 +295,9 @@ files:
|
|
290
295
|
- spec/unit/config_spec.rb
|
291
296
|
- spec/unit/data/client_spec.rb
|
292
297
|
- spec/unit/document_spec.rb
|
298
|
+
- spec/unit/error_code_spec.rb
|
293
299
|
- spec/unit/mash_spec.rb
|
300
|
+
- spec/unit/middleware/authentication/jwt_bearer_spec.rb
|
294
301
|
- spec/unit/middleware/authentication/password_spec.rb
|
295
302
|
- spec/unit/middleware/authentication/token_spec.rb
|
296
303
|
- spec/unit/middleware/authentication_spec.rb
|
@@ -304,7 +311,7 @@ files:
|
|
304
311
|
- spec/unit/signed_request_spec.rb
|
305
312
|
- spec/unit/sobject_spec.rb
|
306
313
|
- spec/unit/tooling/client_spec.rb
|
307
|
-
homepage:
|
314
|
+
homepage: https://restforce.github.io/
|
308
315
|
licenses:
|
309
316
|
- MIT
|
310
317
|
metadata:
|
@@ -318,17 +325,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
318
325
|
requirements:
|
319
326
|
- - ">="
|
320
327
|
- !ruby/object:Gem::Version
|
321
|
-
version: '2.
|
328
|
+
version: '2.5'
|
322
329
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
323
330
|
requirements:
|
324
331
|
- - ">="
|
325
332
|
- !ruby/object:Gem::Version
|
326
333
|
version: '0'
|
327
334
|
requirements: []
|
328
|
-
rubygems_version: 3.
|
335
|
+
rubygems_version: 3.1.2
|
329
336
|
signing_key:
|
330
337
|
specification_version: 4
|
331
|
-
summary: A lightweight
|
338
|
+
summary: A lightweight Ruby client for the Salesforce REST API
|
332
339
|
test_files:
|
333
340
|
- spec/fixtures/auth_error_response.json
|
334
341
|
- spec/fixtures/auth_success_response.json
|
@@ -364,6 +371,7 @@ test_files:
|
|
364
371
|
- spec/fixtures/sobject/upsert_multiple_error_response.json
|
365
372
|
- spec/fixtures/sobject/upsert_updated_success_response.json
|
366
373
|
- spec/fixtures/sobject/write_error_response.json
|
374
|
+
- spec/fixtures/test_private.key
|
367
375
|
- spec/integration/abstract_client_spec.rb
|
368
376
|
- spec/integration/data/client_spec.rb
|
369
377
|
- spec/spec_helper.rb
|
@@ -388,7 +396,9 @@ test_files:
|
|
388
396
|
- spec/unit/config_spec.rb
|
389
397
|
- spec/unit/data/client_spec.rb
|
390
398
|
- spec/unit/document_spec.rb
|
399
|
+
- spec/unit/error_code_spec.rb
|
391
400
|
- spec/unit/mash_spec.rb
|
401
|
+
- spec/unit/middleware/authentication/jwt_bearer_spec.rb
|
392
402
|
- spec/unit/middleware/authentication/password_spec.rb
|
393
403
|
- spec/unit/middleware/authentication/token_spec.rb
|
394
404
|
- spec/unit/middleware/authentication_spec.rb
|