onfido 2.8.0 → 2.9.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45d3181950092e828fccc42002981dd8e4cd00b6ed0aa6759ff1875c2f61a407
|
4
|
+
data.tar.gz: 2bc94fbf53b402b33b176870fc07180dd0b5bbbdf23d574ee7c34c71a6ac2d2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 154987a4c3daa1ecd4a8bb02b1deb59a7c8e8c3d5591d886b48f96a9e41702a22bdc4d00ef70e7b2b18b1c8fb2ee4674ce2db02226f9af21f8e01825bc208ebc
|
7
|
+
data.tar.gz: fc096f80c5cd8f32e8380532706bc9b37f89df16fd628821f7c2906947ad40125770aa17b39107e2832d1b1eed9931274f72577a5ad0d03cab97fcd0fdfcc1ec
|
data/CHANGELOG.md
CHANGED
data/lib/onfido/version.rb
CHANGED
@@ -38,9 +38,17 @@ describe Onfido::WorkflowRun do
|
|
38
38
|
|
39
39
|
describe '#all' do
|
40
40
|
it 'returns the workflow runs' do
|
41
|
-
response = workflow_run.all({ page: 1, sort:
|
41
|
+
response = workflow_run.all({ page: 1, sort: 'asc' })
|
42
42
|
|
43
43
|
expect(response.count).to eq(2)
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
describe '#evidence' do
|
48
|
+
it 'returns the signed PDF' do
|
49
|
+
response = workflow_run.evidence(workflow_run_id)
|
50
|
+
|
51
|
+
expect(response[0..4]).to eq('%PDF-')
|
52
|
+
end
|
53
|
+
end
|
46
54
|
end
|
@@ -11,7 +11,7 @@ end
|
|
11
11
|
class FakeOnfidoAPI < Sinatra::Base # rubocop:disable Metrics/ClassLength
|
12
12
|
before do
|
13
13
|
begin
|
14
|
-
if request.content_type ==
|
14
|
+
if request.content_type == 'application/json; charset=utf-8'
|
15
15
|
body_parameters = JSON.parse(request.body.read)
|
16
16
|
params.merge!(body_parameters) if body_parameters
|
17
17
|
end
|
@@ -249,6 +249,10 @@ class FakeOnfidoAPI < Sinatra::Base # rubocop:disable Metrics/ClassLength
|
|
249
249
|
json_response(200, 'workflow_run.json')
|
250
250
|
end
|
251
251
|
|
252
|
+
get '/v3.6/workflow_runs/:id/signed_evidence_file' do
|
253
|
+
pdf_response(200, 'signed_workflow_run.pdf')
|
254
|
+
end
|
255
|
+
|
252
256
|
get '/v3.6/workflow_runs' do
|
253
257
|
json_response(200, 'workflow_runs.json')
|
254
258
|
end
|
@@ -270,9 +274,17 @@ class FakeOnfidoAPI < Sinatra::Base # rubocop:disable Metrics/ClassLength
|
|
270
274
|
private
|
271
275
|
|
272
276
|
def json_response(response_code, file_name)
|
273
|
-
|
277
|
+
fixture_response(response_code, file_name, 'application/json')
|
278
|
+
end
|
279
|
+
|
280
|
+
def fixture_response(response_code, file_name, custom_content_type)
|
281
|
+
content_type "#{custom_content_type}; charset=utf-8"
|
274
282
|
status response_code
|
275
|
-
File.
|
283
|
+
File.binread("#{File.dirname(__FILE__)}/fixtures/#{file_name}")
|
284
|
+
end
|
285
|
+
|
286
|
+
def pdf_response(response_code, file_name)
|
287
|
+
fixture_response(response_code, file_name, 'application/pdf')
|
276
288
|
end
|
277
289
|
|
278
290
|
def pagination_range
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onfido
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Onfido
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -191,6 +191,7 @@ files:
|
|
191
191
|
- spec/support/fixtures/report.json
|
192
192
|
- spec/support/fixtures/reports.json
|
193
193
|
- spec/support/fixtures/sdk_token.json
|
194
|
+
- spec/support/fixtures/signed_workflow_run.pdf
|
194
195
|
- spec/support/fixtures/unexpected_error_format.json
|
195
196
|
- spec/support/fixtures/webhook.json
|
196
197
|
- spec/support/fixtures/webhooks.json
|
@@ -262,6 +263,7 @@ test_files:
|
|
262
263
|
- spec/support/fixtures/report.json
|
263
264
|
- spec/support/fixtures/reports.json
|
264
265
|
- spec/support/fixtures/sdk_token.json
|
266
|
+
- spec/support/fixtures/signed_workflow_run.pdf
|
265
267
|
- spec/support/fixtures/unexpected_error_format.json
|
266
268
|
- spec/support/fixtures/webhook.json
|
267
269
|
- spec/support/fixtures/webhooks.json
|