smile-identity-core 1.2.1 → 2.0.0
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/release.yml +18 -0
- data/.github/workflows/test.yml +36 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +71 -30
- data/Gemfile +3 -1
- data/Gemfile.lock +35 -7
- data/README.md +33 -464
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/examples/biometric_kyc.rb +67 -0
- data/examples/business_verification.rb +37 -0
- data/examples/document_verification.rb +74 -0
- data/examples/enhanced_kyc.rb +39 -0
- data/examples/example-project/Gemfile +7 -0
- data/examples/example-project/Gemfile.lock +25 -0
- data/examples/example-project/README.md +14 -0
- data/examples/example-project/sample.env +4 -0
- data/examples/example-project/smart_bank.rb +216 -0
- data/examples/smart_selfie_authentication.rb +56 -0
- data/lib/smile-identity-core/business_verification.rb +109 -0
- data/lib/smile-identity-core/constants/env.rb +13 -0
- data/lib/smile-identity-core/constants/image_type.rb +14 -0
- data/lib/smile-identity-core/constants/job_type.rb +13 -0
- data/lib/smile-identity-core/id_api.rb +35 -58
- data/lib/smile-identity-core/signature.rb +15 -36
- data/lib/smile-identity-core/utilities.rb +28 -55
- data/lib/smile-identity-core/validations.rb +32 -0
- data/lib/smile-identity-core/version.rb +4 -1
- data/lib/smile-identity-core/web_api.rb +92 -136
- data/lib/smile-identity-core.rb +11 -5
- data/smile-identity-core.gemspec +26 -21
- metadata +82 -22
- data/.travis.yml +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84fcac3562348da2011a2ccb7d84c2ca44ae2927284212f3430dbc164bd1a704
|
4
|
+
data.tar.gz: 487c49c050a929a5339bc8dccbc44d3b117eca7af717d7a73e0fe6303a86608d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afda841be8343b9c9708e08e2fefc57e384ef5e6adc3223f1b173371199dbdeba68a8a9bbbf89f5ece247c607ecb3f7b614f1ad973ecffc537443c59fe102e30
|
7
|
+
data.tar.gz: 9f7b159ca49672cae6a81d6e6ce76259d5582592ee8b9bb924747161b7c829e562a866f9365d7774544790074bd5c96c1bde5566b41fb3765e4863839f2f428a
|
@@ -0,0 +1,18 @@
|
|
1
|
+
name: Publish to RubyGems
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
tags:
|
5
|
+
- v[0-9]+.[0-9]+.[0-9]+* # should only run when the tags matches sematic versioning
|
6
|
+
jobs:
|
7
|
+
test:
|
8
|
+
uses: ./.github/workflows/test.yml
|
9
|
+
build:
|
10
|
+
needs: test
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v3
|
14
|
+
- name: Release Gem
|
15
|
+
uses: cadwallion/publish-rubygems-action@master
|
16
|
+
env:
|
17
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
18
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: test
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- main
|
6
|
+
pull_request:
|
7
|
+
workflow_dispatch:
|
8
|
+
workflow_call:
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
fail-fast: false
|
14
|
+
matrix:
|
15
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
16
|
+
# See https://www.ruby-lang.org/en/downloads/ for latest stable releases.
|
17
|
+
ruby: ['2.6', '2.7', '3.0', '3.1']
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v3
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
24
|
+
- run: bundle exec rake
|
25
|
+
lint:
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- name: Set up Ruby 3.1
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: 3.1
|
33
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
+
# NOTE: || true should be removed as soon as all offenses are fixed.
|
35
|
+
- name: Run RuboCop
|
36
|
+
run: bundle exec rubocop --parallel || true
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1.2
|
data/CHANGELOG.md
CHANGED
@@ -1,37 +1,47 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
# [2.0.0] - 2022-10-24
|
5
10
|
### Added
|
6
|
-
|
11
|
+
- build: Adds support for ruby 3.1
|
12
|
+
- docs: adds "examples" folder
|
13
|
+
- Adds Business Verfication product
|
7
14
|
|
8
|
-
|
9
|
-
|
10
|
-
|
15
|
+
### Changed
|
16
|
+
- ci: Move from TravisCI to Github Actions
|
17
|
+
- core: Enforces the use of signature on all API calls
|
18
|
+
- core: Adds helper constants SMILE_IDENTITY_CORE::ENV, SMILE_IDENTITY_CORE::IMAGE_TYPE, SMILE_IDENTITY_CORE::JOB_TYPE
|
19
|
+
- Fixes invalid links in gemspec
|
11
20
|
|
12
|
-
|
21
|
+
### Removed
|
22
|
+
- build: Drops support for ruby 2.5.1
|
23
|
+
- core: Removes support for `sec_key` as an authentication method
|
24
|
+
|
25
|
+
## [1.2.1] - 2021-12-02
|
26
|
+
### Changed
|
27
|
+
- Revert changes to version SmileIdentityCore.version_as_hash
|
28
|
+
- Uses hard coded apiVersion
|
29
|
+
|
30
|
+
## [1.2.0] - 2021-10-08
|
13
31
|
### Added
|
14
|
-
|
15
|
-
Introduced return_history and image_links
|
32
|
+
- Add Signature option for signing requests
|
16
33
|
|
17
|
-
## [
|
18
|
-
|
19
|
-
|
20
|
-
Update some error messages
|
21
|
-
Use the signature class in the Web API class
|
22
|
-
Accept more formats as inputs
|
23
|
-
Fix the loss of optional_callback
|
24
|
-
Ensure that we allow nil inputs or empty hashes for options and id_info
|
25
|
-
Confirm the signature when querying the job status
|
26
|
-
Add a Utilities class with get_job_status that we use internally to expose a public get_job_status method on WebApi
|
34
|
+
## [1.1.0] - 2021-09-29
|
35
|
+
Set version information from SmileIdentityCore.version_as_hash
|
36
|
+
- Change the urls for both test and prod aa55a72d10854f05a35db4dad3ea63930e8996f6
|
27
37
|
|
28
|
-
## [0.2
|
29
|
-
|
30
|
-
Add the language to the package information
|
38
|
+
## [1.0.2] - 2020-01-16
|
39
|
+
Add {"success":true,"smile_job_id":"job_id"} to the response when we poll job status too
|
31
40
|
|
32
|
-
## [0.
|
33
|
-
|
34
|
-
|
41
|
+
## [1.0.1] - 2019-10-24
|
42
|
+
## Updated
|
43
|
+
Remove first_name and last_name validations from id information in Web Api
|
44
|
+
Add country, id_number and id_type validations for id information in ID Api
|
35
45
|
|
36
46
|
## [1.0.0] - 2019-10-11
|
37
47
|
## Updated
|
@@ -40,10 +50,41 @@ Add the ID API Class
|
|
40
50
|
Add the ability to query ID Api from the Web API class
|
41
51
|
Update the documentation
|
42
52
|
|
43
|
-
## [
|
44
|
-
|
45
|
-
|
46
|
-
Add country, id_number and id_type validations for id information in ID Api
|
53
|
+
## [0.2.3] - 2019-09-17
|
54
|
+
### Changed
|
55
|
+
- Lenient Decoding of the api key
|
47
56
|
|
48
|
-
## [
|
49
|
-
|
57
|
+
## [0.2.2] - 2019-09-17
|
58
|
+
### Added
|
59
|
+
- Add the language to the package information
|
60
|
+
|
61
|
+
## [0.2.1] - 2019-09-05
|
62
|
+
|
63
|
+
### Added
|
64
|
+
- Accept more formats as inputs
|
65
|
+
- Use the signature class in the Web API class
|
66
|
+
- Add a Utilities class with get_job_status that we use internally to expose a public get_job_status method on WebApi
|
67
|
+
|
68
|
+
### Updated
|
69
|
+
- Updates to the readme
|
70
|
+
- Update some error messages
|
71
|
+
|
72
|
+
### Fixed
|
73
|
+
- Fix the loss of optional_callback
|
74
|
+
- Ensure that we allow nil inputs or empty hashes for options and id_info
|
75
|
+
- Confirm the signature when querying the job status
|
76
|
+
|
77
|
+
## [0.2.0] - 2019-08-14
|
78
|
+
### Added
|
79
|
+
- Introduced return_history and image_links
|
80
|
+
|
81
|
+
### Removed
|
82
|
+
- Removed two parameters: optional_callback and return_job_status in the submit_job function in favour of an options hash.
|
83
|
+
|
84
|
+
## [0.1.1] - 2019-07-23
|
85
|
+
### Added
|
86
|
+
- Some package configurations were added.
|
87
|
+
|
88
|
+
## [0.1.0] - 2019-07-19
|
89
|
+
### Added
|
90
|
+
- The first release version of Web Api.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,20 +1,27 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
smile-identity-core (
|
4
|
+
smile-identity-core (2.0.0)
|
5
5
|
rubyzip (~> 1.2, >= 1.2.3)
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
+
ast (2.4.2)
|
11
12
|
diff-lcs (1.3)
|
12
13
|
docile (1.1.5)
|
13
|
-
ethon (0.
|
14
|
-
ffi (>= 1.
|
15
|
-
ffi (1.
|
14
|
+
ethon (0.16.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
16
17
|
json (2.5.1)
|
17
|
-
|
18
|
+
parallel (1.22.1)
|
19
|
+
parser (3.1.2.1)
|
20
|
+
ast (~> 2.4.1)
|
21
|
+
rainbow (3.1.1)
|
22
|
+
rake (12.3.3)
|
23
|
+
regexp_parser (2.6.0)
|
24
|
+
rexml (3.2.5)
|
18
25
|
rspec (3.8.0)
|
19
26
|
rspec-core (~> 3.8.0)
|
20
27
|
rspec-expectations (~> 3.8.0)
|
@@ -28,6 +35,23 @@ GEM
|
|
28
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
29
36
|
rspec-support (~> 3.8.0)
|
30
37
|
rspec-support (3.8.2)
|
38
|
+
rubocop (1.37.1)
|
39
|
+
json (~> 2.3)
|
40
|
+
parallel (~> 1.10)
|
41
|
+
parser (>= 3.1.2.1)
|
42
|
+
rainbow (>= 2.2.2, < 4.0)
|
43
|
+
regexp_parser (>= 1.8, < 3.0)
|
44
|
+
rexml (>= 3.2.5, < 4.0)
|
45
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
46
|
+
ruby-progressbar (~> 1.7)
|
47
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
48
|
+
rubocop-ast (1.23.0)
|
49
|
+
parser (>= 3.1.1.0)
|
50
|
+
rubocop-rake (0.6.0)
|
51
|
+
rubocop (~> 1.0)
|
52
|
+
rubocop-rspec (2.14.1)
|
53
|
+
rubocop (~> 1.33)
|
54
|
+
ruby-progressbar (1.11.0)
|
31
55
|
rubyzip (1.3.0)
|
32
56
|
simplecov (0.12.0)
|
33
57
|
docile (~> 1.1.0)
|
@@ -36,16 +60,20 @@ GEM
|
|
36
60
|
simplecov-html (0.10.2)
|
37
61
|
typhoeus (1.4.0)
|
38
62
|
ethon (>= 0.9.0)
|
63
|
+
unicode-display_width (2.3.0)
|
39
64
|
|
40
65
|
PLATFORMS
|
41
66
|
ruby
|
42
67
|
|
43
68
|
DEPENDENCIES
|
44
69
|
bundler (~> 2.0)
|
45
|
-
rake (~>
|
70
|
+
rake (~> 12.3)
|
46
71
|
rspec (~> 3.0)
|
72
|
+
rubocop (~> 1.37.1)
|
73
|
+
rubocop-rake (~> 0.6.0)
|
74
|
+
rubocop-rspec (~> 2.14.1)
|
47
75
|
simplecov (~> 0.12.0)
|
48
76
|
smile-identity-core!
|
49
77
|
|
50
78
|
BUNDLED WITH
|
51
|
-
2.
|
79
|
+
2.3.25
|