restforce 5.2.4 → 6.0.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +4 -13
- data/.github/workflows/build.yml +23 -0
- data/.github/workflows/faraday.yml +27 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +19 -0
- data/Gemfile +8 -2
- data/README.md +5 -3
- data/UPGRADING.md +29 -0
- data/lib/restforce/concerns/api.rb +1 -0
- data/lib/restforce/concerns/connection.rb +1 -1
- data/lib/restforce/config.rb +10 -8
- data/lib/restforce/error_code.rb +3 -0
- data/lib/restforce/file_part.rb +12 -4
- data/lib/restforce/middleware/authentication.rb +1 -0
- data/lib/restforce/middleware/caching.rb +140 -15
- data/lib/restforce/middleware/json_request.rb +90 -0
- data/lib/restforce/middleware/json_response.rb +85 -0
- data/lib/restforce/middleware/logger.rb +6 -2
- data/lib/restforce/middleware/raise_error.rb +10 -1
- data/lib/restforce/version.rb +1 -1
- data/lib/restforce.rb +9 -7
- data/restforce.gemspec +5 -4
- data/spec/integration/abstract_client_spec.rb +15 -3
- data/spec/unit/concerns/api_spec.rb +11 -4
- data/spec/unit/concerns/connection_spec.rb +1 -1
- data/spec/unit/config_spec.rb +1 -1
- data/spec/unit/middleware/authentication/jwt_bearer_spec.rb +20 -4
- data/spec/unit/middleware/authentication/password_spec.rb +10 -2
- data/spec/unit/middleware/authentication/token_spec.rb +10 -2
- data/spec/unit/middleware/authentication_spec.rb +5 -5
- metadata +59 -99
- data/.circleci/config.yml +0 -61
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'forwardable'
|
4
4
|
|
5
5
|
module Restforce
|
6
|
-
class Middleware::Logger < Faraday::
|
6
|
+
class Middleware::Logger < Faraday::Middleware
|
7
7
|
extend Forwardable
|
8
8
|
|
9
9
|
def initialize(app, logger, options)
|
@@ -24,7 +24,11 @@ module Restforce
|
|
24
24
|
headers: env[:request_headers],
|
25
25
|
body: env[:body]
|
26
26
|
end
|
27
|
-
|
27
|
+
|
28
|
+
on_request(env) if respond_to?(:on_request)
|
29
|
+
@app.call(env).on_complete do |environment|
|
30
|
+
on_complete(environment) if respond_to?(:on_complete)
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
def on_complete(env)
|
@@ -1,7 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Restforce
|
4
|
-
class Middleware::RaiseError < Faraday::
|
4
|
+
class Middleware::RaiseError < Faraday::Middleware
|
5
|
+
# Required for Faraday versions pre-v1.2.0 which do not include
|
6
|
+
# an implementation of `#call` by default
|
7
|
+
def call(env)
|
8
|
+
on_request(env) if respond_to?(:on_request)
|
9
|
+
@app.call(env).on_complete do |environment|
|
10
|
+
on_complete(environment) if respond_to?(:on_complete)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
5
14
|
def on_complete(env)
|
6
15
|
@env = env
|
7
16
|
case env[:status]
|
data/lib/restforce/version.rb
CHANGED
data/lib/restforce.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'faraday'
|
4
|
-
require '
|
4
|
+
require 'faraday/follow_redirects'
|
5
5
|
require 'json'
|
6
6
|
require 'jwt'
|
7
7
|
|
@@ -64,21 +64,23 @@ module Restforce
|
|
64
64
|
EntityTooLargeError = Class.new(ResponseError)
|
65
65
|
|
66
66
|
require 'restforce/error_code'
|
67
|
+
require 'restforce/middleware/json_request'
|
68
|
+
require 'restforce/middleware/json_response'
|
67
69
|
|
68
70
|
class << self
|
69
71
|
# Alias for Restforce::Data::Client.new
|
70
72
|
#
|
71
73
|
# Shamelessly pulled from https://github.com/pengwynn/octokit/blob/master/lib/octokit.rb
|
72
|
-
def new(
|
73
|
-
data(
|
74
|
+
def new(...)
|
75
|
+
data(...)
|
74
76
|
end
|
75
77
|
|
76
|
-
def data(
|
77
|
-
Restforce::Data::Client.new(
|
78
|
+
def data(...)
|
79
|
+
Restforce::Data::Client.new(...)
|
78
80
|
end
|
79
81
|
|
80
|
-
def tooling(
|
81
|
-
Restforce::Tooling::Client.new(
|
82
|
+
def tooling(...)
|
83
|
+
Restforce::Tooling::Client.new(...)
|
82
84
|
end
|
83
85
|
|
84
86
|
# Helper for decoding signed requests.
|
data/restforce.gemspec
CHANGED
@@ -12,7 +12,6 @@ Gem::Specification.new do |gem|
|
|
12
12
|
|
13
13
|
gem.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
|
14
14
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
15
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
16
15
|
gem.name = "restforce"
|
17
16
|
gem.require_paths = ["lib"]
|
18
17
|
gem.version = Restforce::VERSION
|
@@ -23,10 +22,12 @@ Gem::Specification.new do |gem|
|
|
23
22
|
'rubygems_mfa_required' => 'true'
|
24
23
|
}
|
25
24
|
|
26
|
-
gem.required_ruby_version = '>= 2.
|
25
|
+
gem.required_ruby_version = '>= 2.7'
|
27
26
|
|
28
|
-
gem.add_dependency 'faraday', '<
|
29
|
-
gem.add_dependency '
|
27
|
+
gem.add_dependency 'faraday', '< 2.5.0', '>= 1.1.0'
|
28
|
+
gem.add_dependency 'faraday-follow_redirects', '<= 0.3.0', '< 1.0.0'
|
29
|
+
gem.add_dependency 'faraday-multipart', '>= 1.0.0', '< 2.0.0'
|
30
|
+
gem.add_dependency 'faraday-net_http', '< 3.0.0'
|
30
31
|
gem.add_dependency 'hashie', '>= 1.2.0', '< 6.0'
|
31
32
|
gem.add_dependency 'jwt', ['>= 1.5.6']
|
32
33
|
end
|
@@ -367,7 +367,11 @@ shared_examples_for Restforce::AbstractClient do
|
|
367
367
|
with_body: "grant_type=password&client_id=client_id" \
|
368
368
|
"&client_secret=client_secret&username=foo" \
|
369
369
|
"&password=barsecurity_token"
|
370
|
-
).to_return(
|
370
|
+
).to_return(
|
371
|
+
status: 200,
|
372
|
+
body: fixture(:auth_success_response),
|
373
|
+
headers: { "Content-Type" => "application/json" }
|
374
|
+
)
|
371
375
|
end
|
372
376
|
|
373
377
|
after do
|
@@ -419,7 +423,11 @@ shared_examples_for Restforce::AbstractClient do
|
|
419
423
|
with_body: "grant_type=password&client_id=client_id" \
|
420
424
|
"&client_secret=client_secret&username=foo&" \
|
421
425
|
"password=barsecurity_token"
|
422
|
-
).to_return(
|
426
|
+
).to_return(
|
427
|
+
status: 200,
|
428
|
+
body: fixture(:auth_success_response),
|
429
|
+
headers: { "Content-Type" => "application/json" }
|
430
|
+
)
|
423
431
|
end
|
424
432
|
|
425
433
|
subject { lambda { client.query('SELECT some, fields FROM object') } }
|
@@ -443,7 +451,11 @@ shared_examples_for Restforce::AbstractClient do
|
|
443
451
|
@login = stub_login_request(
|
444
452
|
with_body: "grant_type=password&client_id=client_id&client_secret=" \
|
445
453
|
"client_secret&username=foo&password=barsecurity_token"
|
446
|
-
).to_return(
|
454
|
+
).to_return(
|
455
|
+
status: 200,
|
456
|
+
body: fixture(:auth_success_response),
|
457
|
+
headers: { "Content-Type" => "application/json" }
|
458
|
+
)
|
447
459
|
end
|
448
460
|
|
449
461
|
after do
|
@@ -312,8 +312,11 @@ describe Restforce::Concerns::API do
|
|
312
312
|
let(:attrs) { { id: '1234', StageName: "Call Scheduled" } }
|
313
313
|
|
314
314
|
it 'sends an HTTP PATCH, and returns true' do
|
315
|
-
client.should_receive(:api_patch)
|
316
|
-
|
315
|
+
client.should_receive(:api_patch) do |*args|
|
316
|
+
expect(args).to eq(["sobjects/Whizbang/1234",
|
317
|
+
{ StageName: "Call Scheduled" }])
|
318
|
+
end
|
319
|
+
|
317
320
|
expect(result).to be true
|
318
321
|
end
|
319
322
|
end
|
@@ -322,8 +325,12 @@ describe Restforce::Concerns::API do
|
|
322
325
|
let(:attrs) { { id: '1234/?abc', StageName: "Call Scheduled" } }
|
323
326
|
|
324
327
|
it 'sends an HTTP PATCH, and encodes the ID' do
|
325
|
-
client.should_receive(:api_patch)
|
326
|
-
|
328
|
+
client.should_receive(:api_patch) do |*args|
|
329
|
+
expect(args).to eq(['sobjects/Whizbang/1234%2F%3Fabc', {
|
330
|
+
StageName: "Call Scheduled"
|
331
|
+
}])
|
332
|
+
end
|
333
|
+
|
327
334
|
expect(result).to be true
|
328
335
|
end
|
329
336
|
end
|
@@ -73,7 +73,7 @@ describe Restforce::Concerns::Connection do
|
|
73
73
|
Restforce.stub(log?: true)
|
74
74
|
end
|
75
75
|
|
76
|
-
it "must always be used as the last handler" do
|
76
|
+
it "must always be used as the last handler before the adapter" do
|
77
77
|
client.middleware.handlers.reverse.index(Restforce::Middleware::Logger).
|
78
78
|
should eq 0
|
79
79
|
end
|
data/spec/unit/config_spec.rb
CHANGED
@@ -44,7 +44,7 @@ describe Restforce do
|
|
44
44
|
'SALESFORCE_PROXY_URI' => 'proxy',
|
45
45
|
'SALESFORCE_HOST' => 'test.host.com',
|
46
46
|
'SALESFORCE_API_VERSION' => '37.0' }.
|
47
|
-
each { |var, value| ENV.stub(:
|
47
|
+
each { |var, value| ENV.stub(:fetch).with(var, anything).and_return(value) }
|
48
48
|
end
|
49
49
|
|
50
50
|
its(:username) { should eq 'foo' }
|
@@ -18,14 +18,22 @@ describe Restforce::Middleware::Authentication::JWTBearer do
|
|
18
18
|
stub_login_request(
|
19
19
|
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
20
20
|
"assertion=abc1234567890"
|
21
|
-
).to_return(
|
21
|
+
).to_return(
|
22
|
+
status: 200,
|
23
|
+
body: fixture(:auth_success_response),
|
24
|
+
headers: { "Content-Type" => "application/json" }
|
25
|
+
)
|
22
26
|
end
|
23
27
|
|
24
28
|
let(:fail_request) do
|
25
29
|
stub_login_request(
|
26
30
|
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
27
31
|
"assertion=abc1234567890"
|
28
|
-
).to_return(
|
32
|
+
).to_return(
|
33
|
+
status: 400,
|
34
|
+
body: fixture(:refresh_error_response),
|
35
|
+
headers: { "Content-Type" => "application/json" }
|
36
|
+
)
|
29
37
|
end
|
30
38
|
end
|
31
39
|
|
@@ -48,14 +56,22 @@ describe Restforce::Middleware::Authentication::JWTBearer do
|
|
48
56
|
stub_login_request(
|
49
57
|
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
50
58
|
"assertion=abc1234567890"
|
51
|
-
).to_return(
|
59
|
+
).to_return(
|
60
|
+
status: 200,
|
61
|
+
body: fixture(:auth_success_response),
|
62
|
+
headers: { "Content-Type" => "application/json" }
|
63
|
+
)
|
52
64
|
end
|
53
65
|
|
54
66
|
let(:fail_request) do
|
55
67
|
stub_login_request(
|
56
68
|
body: "grant_type=grant_type—urn:ietf:params:oauth:grant-type:jwt-bearer&" \
|
57
69
|
"assertion=abc1234567890"
|
58
|
-
).to_return(
|
70
|
+
).to_return(
|
71
|
+
status: 400,
|
72
|
+
body: fixture(:refresh_error_response),
|
73
|
+
headers: { "Content-Type" => "application/json" }
|
74
|
+
)
|
59
75
|
end
|
60
76
|
end
|
61
77
|
end
|
@@ -18,14 +18,22 @@ describe Restforce::Middleware::Authentication::Password do
|
|
18
18
|
stub_login_request(
|
19
19
|
body: "grant_type=password&client_id=client_id&client_secret=client_secret" \
|
20
20
|
"&username=foo&password=barsecurity_token"
|
21
|
-
).to_return(
|
21
|
+
).to_return(
|
22
|
+
status: 200,
|
23
|
+
body: fixture(:auth_success_response),
|
24
|
+
headers: { "Content-Type" => "application/json" }
|
25
|
+
)
|
22
26
|
end
|
23
27
|
|
24
28
|
let(:fail_request) do
|
25
29
|
stub_login_request(
|
26
30
|
body: "grant_type=password&client_id=client_id&client_secret=client_secret" \
|
27
31
|
"&username=foo&password=barsecurity_token"
|
28
|
-
).to_return(
|
32
|
+
).to_return(
|
33
|
+
status: 400,
|
34
|
+
body: fixture(:auth_error_response),
|
35
|
+
headers: { "Content-Type" => "application/json" }
|
36
|
+
)
|
29
37
|
end
|
30
38
|
end
|
31
39
|
|
@@ -16,14 +16,22 @@ describe Restforce::Middleware::Authentication::Token do
|
|
16
16
|
stub_login_request(
|
17
17
|
body: "grant_type=refresh_token&refresh_token=refresh_token&" \
|
18
18
|
"client_id=client_id&client_secret=client_secret"
|
19
|
-
).to_return(
|
19
|
+
).to_return(
|
20
|
+
status: 200,
|
21
|
+
body: fixture(:auth_success_response),
|
22
|
+
headers: { "Content-Type" => "application/json" }
|
23
|
+
)
|
20
24
|
end
|
21
25
|
|
22
26
|
let(:fail_request) do
|
23
27
|
stub_login_request(
|
24
28
|
body: "grant_type=refresh_token&refresh_token=refresh_token&" \
|
25
29
|
"client_id=client_id&client_secret=client_secret"
|
26
|
-
).to_return(
|
30
|
+
).to_return(
|
31
|
+
status: 400,
|
32
|
+
body: fixture(:refresh_error_response),
|
33
|
+
headers: { "Content-Type" => "application/json" }
|
34
|
+
)
|
27
35
|
end
|
28
36
|
end
|
29
37
|
end
|
@@ -59,7 +59,7 @@ describe Restforce::Middleware::Authentication do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
its(:handlers) {
|
62
|
-
should include
|
62
|
+
should include Restforce::Middleware::JsonResponse
|
63
63
|
}
|
64
64
|
its(:handlers) { should_not include Restforce::Middleware::Logger }
|
65
65
|
its(:adapter) { should eq Faraday::Adapter::NetHttp }
|
@@ -71,7 +71,7 @@ describe Restforce::Middleware::Authentication do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
its(:handlers) {
|
74
|
-
should include
|
74
|
+
should include Restforce::Middleware::JsonResponse,
|
75
75
|
Restforce::Middleware::Logger
|
76
76
|
}
|
77
77
|
its(:adapter) { should eq Faraday::Adapter::NetHttp }
|
@@ -83,7 +83,7 @@ describe Restforce::Middleware::Authentication do
|
|
83
83
|
end
|
84
84
|
|
85
85
|
its(:handlers) {
|
86
|
-
should include
|
86
|
+
should include Restforce::Middleware::JsonResponse
|
87
87
|
}
|
88
88
|
its(:adapter) { should eq Faraday::Adapter::Typhoeus }
|
89
89
|
end
|
@@ -97,7 +97,7 @@ describe Restforce::Middleware::Authentication do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
describe '.error_message' do
|
100
|
-
context 'when
|
100
|
+
context 'when response_body is present' do
|
101
101
|
let(:response) {
|
102
102
|
Faraday::Response.new(
|
103
103
|
response_body: { 'error' => 'error', 'error_description' => 'description' },
|
@@ -109,7 +109,7 @@ describe Restforce::Middleware::Authentication do
|
|
109
109
|
it { should eq "error: description (401)" }
|
110
110
|
end
|
111
111
|
|
112
|
-
context 'when
|
112
|
+
context 'when response_body is nil' do
|
113
113
|
let(:response) { Faraday::Response.new(status: 401) }
|
114
114
|
|
115
115
|
subject { middleware.error_message(response) }
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Rogers
|
8
8
|
- Eric J. Holmes
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -17,40 +17,74 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "<"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 2.5.0
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
23
|
+
version: 1.1.0
|
24
24
|
type: :runtime
|
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: 2.5.0
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.1.0
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
35
|
+
name: faraday-follow_redirects
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "<="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.3.0
|
41
|
+
- - "<"
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
43
|
+
version: 1.0.0
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
41
48
|
- - "<="
|
42
49
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
50
|
+
version: 0.3.0
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.0.0
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: faraday-multipart
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 1.0.0
|
61
|
+
- - "<"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 2.0.0
|
44
64
|
type: :runtime
|
45
65
|
prerelease: false
|
46
66
|
version_requirements: !ruby/object:Gem::Requirement
|
47
67
|
requirements:
|
48
68
|
- - ">="
|
49
69
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
51
|
-
- - "
|
70
|
+
version: 1.0.0
|
71
|
+
- - "<"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 2.0.0
|
74
|
+
- !ruby/object:Gem::Dependency
|
75
|
+
name: faraday-net_http
|
76
|
+
requirement: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - "<"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 3.0.0
|
81
|
+
type: :runtime
|
82
|
+
prerelease: false
|
83
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "<"
|
52
86
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
87
|
+
version: 3.0.0
|
54
88
|
- !ruby/object:Gem::Dependency
|
55
89
|
name: hashie
|
56
90
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,9 +127,10 @@ executables: []
|
|
93
127
|
extensions: []
|
94
128
|
extra_rdoc_files: []
|
95
129
|
files:
|
96
|
-
- ".circleci/config.yml"
|
97
130
|
- ".github/ISSUE_TEMPLATE/unhandled-salesforce-error.md"
|
98
131
|
- ".github/dependabot.yml"
|
132
|
+
- ".github/workflows/build.yml"
|
133
|
+
- ".github/workflows/faraday.yml"
|
99
134
|
- ".gitignore"
|
100
135
|
- ".rubocop.yml"
|
101
136
|
- ".rubocop_todo.yml"
|
@@ -142,6 +177,8 @@ files:
|
|
142
177
|
- lib/restforce/middleware/custom_headers.rb
|
143
178
|
- lib/restforce/middleware/gzip.rb
|
144
179
|
- lib/restforce/middleware/instance_url.rb
|
180
|
+
- lib/restforce/middleware/json_request.rb
|
181
|
+
- lib/restforce/middleware/json_response.rb
|
145
182
|
- lib/restforce/middleware/logger.rb
|
146
183
|
- lib/restforce/middleware/mashify.rb
|
147
184
|
- lib/restforce/middleware/multipart.rb
|
@@ -240,7 +277,7 @@ metadata:
|
|
240
277
|
source_code_uri: https://github.com/restforce/restforce
|
241
278
|
changelog_uri: https://github.com/restforce/restforce/blob/master/CHANGELOG.md
|
242
279
|
rubygems_mfa_required: 'true'
|
243
|
-
post_install_message:
|
280
|
+
post_install_message:
|
244
281
|
rdoc_options: []
|
245
282
|
require_paths:
|
246
283
|
- lib
|
@@ -248,92 +285,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
248
285
|
requirements:
|
249
286
|
- - ">="
|
250
287
|
- !ruby/object:Gem::Version
|
251
|
-
version: '2.
|
288
|
+
version: '2.7'
|
252
289
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
253
290
|
requirements:
|
254
|
-
- - "
|
291
|
+
- - ">"
|
255
292
|
- !ruby/object:Gem::Version
|
256
|
-
version:
|
293
|
+
version: 1.3.1
|
257
294
|
requirements: []
|
258
|
-
rubygems_version: 3.
|
259
|
-
signing_key:
|
295
|
+
rubygems_version: 3.1.6
|
296
|
+
signing_key:
|
260
297
|
specification_version: 4
|
261
298
|
summary: A lightweight Ruby client for the Salesforce REST API
|
262
|
-
test_files:
|
263
|
-
- spec/fixtures/auth_error_response.json
|
264
|
-
- spec/fixtures/auth_success_response.json
|
265
|
-
- spec/fixtures/blob.jpg
|
266
|
-
- spec/fixtures/expired_session_response.json
|
267
|
-
- spec/fixtures/reauth_success_response.json
|
268
|
-
- spec/fixtures/refresh_error_response.json
|
269
|
-
- spec/fixtures/refresh_success_response.json
|
270
|
-
- spec/fixtures/services_data_success_response.json
|
271
|
-
- spec/fixtures/sobject/create_success_response.json
|
272
|
-
- spec/fixtures/sobject/delete_error_response.json
|
273
|
-
- spec/fixtures/sobject/describe_sobjects_success_response.json
|
274
|
-
- spec/fixtures/sobject/get_deleted_success_response.json
|
275
|
-
- spec/fixtures/sobject/get_updated_success_response.json
|
276
|
-
- spec/fixtures/sobject/list_sobjects_success_response.json
|
277
|
-
- spec/fixtures/sobject/list_view_results_success_response.json
|
278
|
-
- spec/fixtures/sobject/org_query_response.json
|
279
|
-
- spec/fixtures/sobject/query_aggregate_success_response.json
|
280
|
-
- spec/fixtures/sobject/query_empty_response.json
|
281
|
-
- spec/fixtures/sobject/query_error_response.json
|
282
|
-
- spec/fixtures/sobject/query_paginated_first_page_response.json
|
283
|
-
- spec/fixtures/sobject/query_paginated_last_page_response.json
|
284
|
-
- spec/fixtures/sobject/query_success_response.json
|
285
|
-
- spec/fixtures/sobject/recent_success_response.json
|
286
|
-
- spec/fixtures/sobject/search_error_response.json
|
287
|
-
- spec/fixtures/sobject/search_success_response.json
|
288
|
-
- spec/fixtures/sobject/sobject_describe_error_response.json
|
289
|
-
- spec/fixtures/sobject/sobject_describe_success_response.json
|
290
|
-
- spec/fixtures/sobject/sobject_find_error_response.json
|
291
|
-
- spec/fixtures/sobject/sobject_find_success_response.json
|
292
|
-
- spec/fixtures/sobject/sobject_select_success_response.json
|
293
|
-
- spec/fixtures/sobject/upsert_created_success_response.json
|
294
|
-
- spec/fixtures/sobject/upsert_error_response.json
|
295
|
-
- spec/fixtures/sobject/upsert_multiple_error_response.json
|
296
|
-
- spec/fixtures/sobject/upsert_updated_success_response.json
|
297
|
-
- spec/fixtures/sobject/write_error_response.json
|
298
|
-
- spec/fixtures/test_private.key
|
299
|
-
- spec/integration/abstract_client_spec.rb
|
300
|
-
- spec/integration/data/client_spec.rb
|
301
|
-
- spec/spec_helper.rb
|
302
|
-
- spec/support/client_integration.rb
|
303
|
-
- spec/support/concerns.rb
|
304
|
-
- spec/support/event_machine.rb
|
305
|
-
- spec/support/fixture_helpers.rb
|
306
|
-
- spec/support/matchers.rb
|
307
|
-
- spec/support/middleware.rb
|
308
|
-
- spec/support/mock_cache.rb
|
309
|
-
- spec/unit/abstract_client_spec.rb
|
310
|
-
- spec/unit/attachment_spec.rb
|
311
|
-
- spec/unit/collection_spec.rb
|
312
|
-
- spec/unit/concerns/api_spec.rb
|
313
|
-
- spec/unit/concerns/authentication_spec.rb
|
314
|
-
- spec/unit/concerns/base_spec.rb
|
315
|
-
- spec/unit/concerns/batch_api_spec.rb
|
316
|
-
- spec/unit/concerns/caching_spec.rb
|
317
|
-
- spec/unit/concerns/canvas_spec.rb
|
318
|
-
- spec/unit/concerns/composite_api_spec.rb
|
319
|
-
- spec/unit/concerns/connection_spec.rb
|
320
|
-
- spec/unit/concerns/streaming_spec.rb
|
321
|
-
- spec/unit/config_spec.rb
|
322
|
-
- spec/unit/data/client_spec.rb
|
323
|
-
- spec/unit/document_spec.rb
|
324
|
-
- spec/unit/error_code_spec.rb
|
325
|
-
- spec/unit/mash_spec.rb
|
326
|
-
- spec/unit/middleware/authentication/jwt_bearer_spec.rb
|
327
|
-
- spec/unit/middleware/authentication/password_spec.rb
|
328
|
-
- spec/unit/middleware/authentication/token_spec.rb
|
329
|
-
- spec/unit/middleware/authentication_spec.rb
|
330
|
-
- spec/unit/middleware/authorization_spec.rb
|
331
|
-
- spec/unit/middleware/custom_headers_spec.rb
|
332
|
-
- spec/unit/middleware/gzip_spec.rb
|
333
|
-
- spec/unit/middleware/instance_url_spec.rb
|
334
|
-
- spec/unit/middleware/logger_spec.rb
|
335
|
-
- spec/unit/middleware/mashify_spec.rb
|
336
|
-
- spec/unit/middleware/raise_error_spec.rb
|
337
|
-
- spec/unit/signed_request_spec.rb
|
338
|
-
- spec/unit/sobject_spec.rb
|
339
|
-
- spec/unit/tooling/client_spec.rb
|
299
|
+
test_files: []
|
data/.circleci/config.yml
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
|
3
|
-
references:
|
4
|
-
steps: &steps
|
5
|
-
- checkout
|
6
|
-
|
7
|
-
- run:
|
8
|
-
name: Update Bundler
|
9
|
-
command: gem install bundler
|
10
|
-
|
11
|
-
- run:
|
12
|
-
name: Install dependencies from .gemspec
|
13
|
-
command: bundle install --jobs=4 --retry=3 --path vendor/bundle
|
14
|
-
|
15
|
-
- run:
|
16
|
-
name: Run RSpec tests
|
17
|
-
command: |
|
18
|
-
mkdir /tmp/test-results
|
19
|
-
|
20
|
-
bundle exec rspec --format progress \
|
21
|
-
--format RspecJunitFormatter \
|
22
|
-
--out /tmp/test-results/rspec.xml \
|
23
|
-
--format progress \
|
24
|
-
spec/**/*_spec.rb
|
25
|
-
|
26
|
-
- run:
|
27
|
-
name: Check code style with Rubocop
|
28
|
-
command: bundle exec rubocop
|
29
|
-
|
30
|
-
- store_test_results:
|
31
|
-
path: /tmp/test-results
|
32
|
-
- store_artifacts:
|
33
|
-
path: /tmp/test-results
|
34
|
-
destination: test-results
|
35
|
-
|
36
|
-
jobs:
|
37
|
-
build-ruby31:
|
38
|
-
docker:
|
39
|
-
- image: cimg/ruby:3.1
|
40
|
-
steps: *steps
|
41
|
-
build-ruby30:
|
42
|
-
docker:
|
43
|
-
- image: cimg/ruby:3.0
|
44
|
-
steps: *steps
|
45
|
-
build-ruby27:
|
46
|
-
docker:
|
47
|
-
- image: cimg/ruby:2.7
|
48
|
-
steps: *steps
|
49
|
-
build-ruby26:
|
50
|
-
docker:
|
51
|
-
- image: cimg/ruby:2.6
|
52
|
-
steps: *steps
|
53
|
-
|
54
|
-
workflows:
|
55
|
-
version: 2
|
56
|
-
tests:
|
57
|
-
jobs:
|
58
|
-
- build-ruby31
|
59
|
-
- build-ruby30
|
60
|
-
- build-ruby27
|
61
|
-
- build-ruby26
|