yoti_sandbox 1.2.0 → 1.2.1

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: 3b95016e63022dda0044df80a5000d043a84cab4df3091ac4089c7e2dff44f5c
4
- data.tar.gz: 9d613fdbcc9a92c06e311236e74c0f17d7c2753ea728c98ebe58ea9005141ca7
3
+ metadata.gz: b28e95307ea6fccc695c859deaf4511bd06e56db00da5ee3064663e45f3548a3
4
+ data.tar.gz: f99002f1962e15be43e1eff62b594af8fdfb45beb43148df8bf648758ba6c299
5
5
  SHA512:
6
- metadata.gz: bd050c465f05d84b43d1b95155618467a1fa6dd8e7a2ea630c35822b87321aa2331bcc31343b202d98d6c5c9ce5b9b06f849541e521b40786a6a02c32b8ef4f3
7
- data.tar.gz: 8f6eca8ad30da0dcfaab8f9909703ce12fa465e1fe43e4958464f53a47ee00719e33009152cd8db9054492644a2d63ab2f59fa631b4b36ada06f800a3a6aeac2
6
+ metadata.gz: 5b459b8d299a31fe540ec5cdc38264ac1d11dafa0313cce0c82befd9816f76b184f0a2db7c3733a1435e889719441975e28d90840e5bdeceac6ea4663403845e
7
+ data.tar.gz: bab62a807f2afe3693c09536438e1203c0a586ee924f3de55137520eb9bd6c802fe77194fe441bc1abb3b17179cc03c39084a07fa8204de2519202f9b1870eae
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'json'
4
+
3
5
  module Yoti
4
6
  module Sandbox
5
7
  module DocScan
@@ -22,7 +24,7 @@ module Yoti
22
24
  super(report)
23
25
 
24
26
  Validation.assert_is_a(Hash, document_fields, 'document_fields')
25
- document_fields.each { |_k, v| Validation.assert_is_a(String, v, 'document_fields value') }
27
+ document_fields.each { |_k, v| Validation.assert_respond_to(:to_json, v, 'document_fields value') }
26
28
  @document_fields = document_fields
27
29
  end
28
30
 
@@ -42,13 +44,13 @@ module Yoti
42
44
 
43
45
  #
44
46
  # @param [String] key
45
- # @param [String] value
47
+ # @param [#to_json] value
46
48
  #
47
49
  # @return [self]
48
50
  #
49
51
  def with_document_field(key, value)
50
52
  Validation.assert_is_a(String, key, 'key')
51
- Validation.assert_is_a(String, value, 'value')
53
+ Validation.assert_respond_to(:to_json, value, 'value')
52
54
  @document_fields[key] = value
53
55
  self
54
56
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'json'
4
+
3
5
  module Yoti
4
6
  module Sandbox
5
7
  module DocScan
@@ -45,7 +47,7 @@ module Yoti
45
47
  #
46
48
  def initialize(document_fields)
47
49
  Validation.assert_is_a(Hash, document_fields, 'document_fields')
48
- document_fields.each { |_k, v| Validation.assert_is_a(String, v, 'document_fields value') }
50
+ document_fields.each { |_k, v| Validation.assert_respond_to(:to_json, v, 'document_fields value') }
49
51
  @document_fields = document_fields
50
52
  end
51
53
 
@@ -67,13 +69,13 @@ module Yoti
67
69
 
68
70
  #
69
71
  # @param [String] key
70
- # @param [String] value
72
+ # @param [#to_json] value
71
73
  #
72
74
  # @return [self]
73
75
  #
74
76
  def with_document_field(key, value)
75
77
  Validation.assert_is_a(String, key, 'key')
76
- Validation.assert_is_a(String, value, 'value')
78
+ Validation.assert_respond_to(:to_json, value, 'value')
77
79
  @document_fields[key] = value
78
80
  self
79
81
  end
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'yoti_sandbox'
6
- spec.version = '1.2.0'
6
+ spec.version = '1.2.1'
7
7
  spec.authors = ['Yoti']
8
8
  spec.email = ['websdk@yoti.com']
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yoti_sandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoti
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yoti
@@ -175,7 +175,7 @@ homepage: https://github.com/getyoti/yoti-ruby-sdk-sandbox
175
175
  licenses:
176
176
  - MIT
177
177
  metadata: {}
178
- post_install_message:
178
+ post_install_message:
179
179
  rdoc_options: []
180
180
  require_paths:
181
181
  - lib
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  requirements: []
193
193
  rubygems_version: 3.0.6
194
- signing_key:
194
+ signing_key:
195
195
  specification_version: 4
196
196
  summary: Yoti Ruby Sandbox SDK for back-end integration.
197
197
  test_files: []