smile-identity-core 2.2.3 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ module SmileIdentityCore
58
58
  %i[user_id job_id job_type].each do |key|
59
59
  if partner_params[key].to_s.empty?
60
60
  raise ArgumentError,
61
- "Please make sure that #{key} is included in the partner params"
61
+ "Please make sure that #{key} is included in the partner params"
62
62
  end
63
63
  end
64
64
 
@@ -135,18 +135,18 @@ module SmileIdentityCore
135
135
 
136
136
  def request_web_token(request_params)
137
137
  request_params = request_params
138
- .merge(SmileIdentityCore::Signature.new(@partner_id, @api_key).generate_signature(Time.now.to_s))
139
- .merge(
140
- { partner_id: @partner_id,
141
- source_sdk: SmileIdentityCore::SOURCE_SDK,
142
- source_sdk_version: SmileIdentityCore::VERSION }
143
- )
138
+ .merge(SmileIdentityCore::Signature.new(@partner_id, @api_key).generate_signature(Time.now.to_s))
139
+ .merge(
140
+ { partner_id: @partner_id,
141
+ source_sdk: SmileIdentityCore::SOURCE_SDK,
142
+ source_sdk_version: SmileIdentityCore::VERSION },
143
+ )
144
144
  url = "#{@url}/token"
145
145
 
146
146
  response = Typhoeus.post(
147
147
  url,
148
148
  headers: { 'Content-Type' => 'application/json' },
149
- body: request_params.to_json
149
+ body: request_params.to_json,
150
150
  )
151
151
 
152
152
  return response.body if response.code == 200
@@ -204,7 +204,7 @@ module SmileIdentityCore
204
204
  model_parameters: {}, # what is this for
205
205
  callback_url: @callback_url,
206
206
  source_sdk: SmileIdentityCore::SOURCE_SDK,
207
- source_sdk_version: SmileIdentityCore::VERSION
207
+ source_sdk_version: SmileIdentityCore::VERSION,
208
208
  ).to_json
209
209
  end
210
210
 
@@ -214,7 +214,7 @@ module SmileIdentityCore
214
214
  url,
215
215
  method: 'POST',
216
216
  headers: { 'Content-Type' => 'application/json' },
217
- body: configure_prep_upload_json
217
+ body: configure_prep_upload_json,
218
218
  )
219
219
 
220
220
  request.on_complete do |response|
@@ -226,7 +226,7 @@ module SmileIdentityCore
226
226
  info_json = configure_info_json(prep_upload_response)
227
227
 
228
228
  file_upload_response = upload_file(prep_upload_response['upload_url'], info_json,
229
- prep_upload_response['smile_job_id'])
229
+ prep_upload_response['smile_job_id'])
230
230
  return file_upload_response
231
231
  end
232
232
 
@@ -237,38 +237,38 @@ module SmileIdentityCore
237
237
 
238
238
  def configure_info_json(server_information)
239
239
  {
240
- "package_information": {
241
- "apiVersion": {
242
- "buildNumber": 0,
243
- "majorVersion": 2,
244
- "minorVersion": 0
240
+ package_information: {
241
+ apiVersion: {
242
+ buildNumber: 0,
243
+ majorVersion: 2,
244
+ minorVersion: 0,
245
245
  },
246
- "language": 'ruby'
246
+ language: 'ruby',
247
247
  },
248
- "misc_information": SmileIdentityCore::Signature.new(@partner_id, @api_key)
249
- .generate_signature(Time.now.to_s)
250
- .merge(
251
- "retry": 'false',
252
- "partner_params": @partner_params,
253
- "file_name": 'selfie.zip', # figure out what to do here
254
- "smile_client_id": @partner_id,
255
- "callback_url": @callback_url,
256
- "userData": { # TO ASK what goes here
257
- "isVerifiedProcess": false,
258
- "name": '',
259
- "fbUserID": '',
260
- "firstName": 'Bill',
261
- "lastName": '',
262
- "gender": '',
263
- "email": '',
264
- "phone": '',
265
- "countryCode": '+',
266
- "countryName": ''
267
- }
268
- ),
269
- "id_info": @id_info,
270
- "images": configure_image_payload,
271
- "server_information": server_information
248
+ misc_information: SmileIdentityCore::Signature.new(@partner_id, @api_key)
249
+ .generate_signature(Time.now.to_s)
250
+ .merge(
251
+ retry: 'false',
252
+ partner_params: @partner_params,
253
+ file_name: 'selfie.zip', # figure out what to do here
254
+ smile_client_id: @partner_id,
255
+ callback_url: @callback_url,
256
+ userData: { # TO ASK what goes here
257
+ isVerifiedProcess: false,
258
+ name: '',
259
+ fbUserID: '',
260
+ firstName: 'Bill',
261
+ lastName: '',
262
+ gender: '',
263
+ email: '',
264
+ phone: '',
265
+ countryCode: '+',
266
+ countryName: '',
267
+ },
268
+ ),
269
+ id_info: @id_info,
270
+ images: configure_image_payload,
271
+ server_information: server_information,
272
272
  }
273
273
  end
274
274
 
@@ -278,13 +278,13 @@ module SmileIdentityCore
278
278
  {
279
279
  image_type_id: i[:image_type_id],
280
280
  image: '',
281
- file_name: File.basename(i[:image])
281
+ file_name: File.basename(i[:image]),
282
282
  }
283
283
  else
284
284
  {
285
285
  image_type_id: i[:image_type_id],
286
286
  image: i[:image],
287
- file_name: ''
287
+ file_name: '',
288
288
  }
289
289
  end
290
290
  end
@@ -304,7 +304,7 @@ module SmileIdentityCore
304
304
  @images.each do |img|
305
305
  if (img[:image_type_id]).zero? || img[:image_type_id] == 1
306
306
  zos.put_next_entry(File.basename(img[:image]))
307
- zos.print IO.read(img[:image])
307
+ zos.print File.read(img[:image])
308
308
  end
309
309
  end
310
310
  end
@@ -319,7 +319,7 @@ module SmileIdentityCore
319
319
  url,
320
320
  method: 'PUT',
321
321
  headers: { 'Content-Type' => 'application/zip' },
322
- body: file.read
322
+ body: file.read,
323
323
  )
324
324
 
325
325
  request.on_complete do |response|
@@ -5,21 +5,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'smile-identity-core/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'smile-identity-core'
9
- spec.version = SmileIdentityCore::VERSION
10
- spec.authors = ['Smile Identity']
11
- spec.email = ['support@smileidentity.com']
8
+ spec.name = 'smile-identity-core'
9
+ spec.version = SmileIdentityCore::VERSION
10
+ spec.authors = ['Smile Identity']
11
+ spec.email = ['support@usesmileid.com']
12
12
 
13
- spec.summary = 'The Smile Identity Web API allows the user to access\
13
+ spec.summary = 'The Smile Identity Web API allows the user to access\
14
14
  most of the features of the Smile Identity system through direct server to server queries.'
15
- spec.description = 'The Official Smile Identity gem'
16
- spec.homepage = 'https://www.smileidentity.com/'
17
- spec.required_ruby_version = '>= 2.5'
15
+ spec.description = 'The Official Smile Identity gem'
16
+ spec.homepage = 'https://www.usesmileid.com/'
17
+ spec.required_ruby_version = '>= 2.6'
18
18
  spec.license = 'MIT'
19
19
 
20
20
  spec.metadata['homepage_uri'] = spec.homepage
21
21
  spec.metadata['source_code_uri'] = 'https://github.com/smileidentity/smile-identity-core-ruby'
22
- spec.metadata['documentation_uri'] = 'https://docs.smileidentity.com'
22
+ spec.metadata['documentation_uri'] = 'https://docs.usesmileid.com'
23
23
  spec.metadata['changelog_uri'] = 'https://github.com/smileidentity/smile-identity-core-ruby/blob/master/CHANGELOG.md'
24
24
 
25
25
  # Specify which files should be added to the gem when it is released.
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
28
28
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
29
  end
30
- spec.bindir = 'exe'
31
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
34
  spec.add_development_dependency 'bundler', '~> 2.0'
@@ -41,4 +41,5 @@ Gem::Specification.new do |spec|
41
41
 
42
42
  spec.add_dependency 'rubyzip', '~> 1.2', '>= 1.2.3'
43
43
  spec.add_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
44
+ spec.metadata['rubygems_mfa_required'] = 'true'
44
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smile-identity-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smile Identity
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-23 00:00:00.000000000 Z
11
+ date: 2024-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,11 +150,12 @@ dependencies:
150
150
  version: 1.0.1
151
151
  description: The Official Smile Identity gem
152
152
  email:
153
- - support@smileidentity.com
153
+ - support@usesmileid.com
154
154
  executables: []
155
155
  extensions: []
156
156
  extra_rdoc_files: []
157
157
  files:
158
+ - ".github/dependabot.yml"
158
159
  - ".github/workflows/release.yml"
159
160
  - ".github/workflows/test.yml"
160
161
  - ".gitignore"
@@ -194,14 +195,15 @@ files:
194
195
  - lib/smile-identity-core/version.rb
195
196
  - lib/smile-identity-core/web_api.rb
196
197
  - smile-identity-core.gemspec
197
- homepage: https://www.smileidentity.com/
198
+ homepage: https://www.usesmileid.com/
198
199
  licenses:
199
200
  - MIT
200
201
  metadata:
201
- homepage_uri: https://www.smileidentity.com/
202
+ homepage_uri: https://www.usesmileid.com/
202
203
  source_code_uri: https://github.com/smileidentity/smile-identity-core-ruby
203
- documentation_uri: https://docs.smileidentity.com
204
+ documentation_uri: https://docs.usesmileid.com
204
205
  changelog_uri: https://github.com/smileidentity/smile-identity-core-ruby/blob/master/CHANGELOG.md
206
+ rubygems_mfa_required: 'true'
205
207
  post_install_message:
206
208
  rdoc_options: []
207
209
  require_paths:
@@ -210,14 +212,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
212
  requirements:
211
213
  - - ">="
212
214
  - !ruby/object:Gem::Version
213
- version: '2.5'
215
+ version: '2.6'
214
216
  required_rubygems_version: !ruby/object:Gem::Requirement
215
217
  requirements:
216
218
  - - ">="
217
219
  - !ruby/object:Gem::Version
218
220
  version: '0'
219
221
  requirements: []
220
- rubygems_version: 3.4.10
222
+ rubygems_version: 3.5.9
221
223
  signing_key:
222
224
  specification_version: 4
223
225
  summary: The Smile Identity Web API allows the user to access\ most of the features