avataaars 0.2.1 → 0.2.3

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: cb3f86f2a43fbb1e9ebef665e5d54240801659bc3e33b2f2d5f04f998c33b6d4
4
- data.tar.gz: 37df8e8b8f42049dd2fed83c88d5a0ba52a67b67bc3f410992e13b2dc13b0913
3
+ metadata.gz: 7502c7e9b190053d66e44c550127c7225ba60670dbdd915e1c673813b4754bf9
4
+ data.tar.gz: 107f3617e075d47ef37c29ec486001a1ba3c4a5f86c4d06317a57eca84671254
5
5
  SHA512:
6
- metadata.gz: b95bc6bb087a42b40c31d3ca4046d34442b0111c75122197966fd6b301711b0d4db4e4d573e018d4bebbbc5443537a526592702e868b4e3ae000d1ad1a037b5c
7
- data.tar.gz: a025ee6130a94324203dc61a00c7004e1b231876c51891524a4d3eca9f179e09a4556b46dd522b1cee9c05a86f25690419207185ef2467b675d4d20a2853ef12
6
+ metadata.gz: 685897bb9a0162631667b5b788fd2206aa81a58a416731ba4ae8c93198657be4b8209078c524c66ef00eaf77c1c6e5b9001bfb33ef5cb87e4c76a7b851236b5f
7
+ data.tar.gz: 77e3ca35c4ad9303c09da82133059fc7b01c6b2909d172e4c091db50159ad803a9236a5d669bf6622858dc437763316438dc758db4e3bc0d79f3d5ea7107a25b
@@ -14,10 +14,10 @@ class Avataaars
14
14
  @app_root = app_root
15
15
  end
16
16
 
17
- def create_avatar(options)
17
+ def create_avatar(**options)
18
18
  spawn_process
19
19
  ensure_packages_are_initiated
20
- call_js_method options
20
+ call_js_method(**options)
21
21
  ensure
22
22
  cleanup_process if stdin
23
23
  end
@@ -73,7 +73,7 @@ class Avataaars
73
73
  @package_json ||= JSON.parse(File.read(package_json_path))
74
74
  end
75
75
 
76
- def call_js_method(options) # rubocop:disable Metrics/MethodLength
76
+ def call_js_method(**options) # rubocop:disable Metrics/MethodLength
77
77
  stdin.puts JSON.dump([options])
78
78
  input = stdout.gets
79
79
  raise Errno::EPIPE, "Can't read from worker" if input.nil?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Avataaars
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.3'
5
5
  end
data/lib/avataaars.rb CHANGED
@@ -14,7 +14,7 @@ class Avataaars
14
14
  # @param [Hash] options Optional parameters to pass to avatar processor
15
15
  # see https://github.com/fangpenlin/avataaars
16
16
  #
17
- def initialize(options = {})
17
+ def initialize(**options)
18
18
  @root_path = options.delete :root_path
19
19
  @options = options
20
20
  end
@@ -26,7 +26,7 @@ class Avataaars
26
26
  #
27
27
  def create_avatar
28
28
  normalised_options = Utils.normalize_object(@options)
29
- processor.create_avatar normalised_options
29
+ processor.create_avatar(**normalised_options)
30
30
  end
31
31
 
32
32
  private
metadata CHANGED
@@ -1,71 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avataaars
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-19 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: mini_magick
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '4.10'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '4.10'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.9'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.9'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.86'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.86'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop-rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.41'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.41'
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
+ dependencies: []
69
13
  description: Ruby wrapper library to call to avataaars React component using NodeJS
70
14
  email:
71
15
  - abromwich@studiosity.com
@@ -92,10 +36,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
36
  requirements:
93
37
  - - ">="
94
38
  - !ruby/object:Gem::Version
95
- version: 2.5.0
39
+ version: 3.0.0
96
40
  - - "<"
97
41
  - !ruby/object:Gem::Version
98
- version: 3.2.0
42
+ version: 3.5.0
99
43
  required_rubygems_version: !ruby/object:Gem::Requirement
100
44
  requirements:
101
45
  - - ">="