avataaars 0.2.1 → 0.2.2

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: f8a129025b2b6847cbc99cb661acee417401df787ece4ee7c1c44305305dae9a
4
+ data.tar.gz: 624f1bd3d22295cec2e5b771fdcb11bb062000bdf6b469dcdf4b466cec3eb592
5
5
  SHA512:
6
- metadata.gz: b95bc6bb087a42b40c31d3ca4046d34442b0111c75122197966fd6b301711b0d4db4e4d573e018d4bebbbc5443537a526592702e868b4e3ae000d1ad1a037b5c
7
- data.tar.gz: a025ee6130a94324203dc61a00c7004e1b231876c51891524a4d3eca9f179e09a4556b46dd522b1cee9c05a86f25690419207185ef2467b675d4d20a2853ef12
6
+ metadata.gz: 2cd51288045bfd9f3f4a474f6bbfb9b7451db193d5383334de7cd03156237382fb5d1fde35626082291e9ae9f365004929b1a26eaea9faab45daccfef5cbf814
7
+ data.tar.gz: 4d29445fde8a17c080781b028b1423bdf8b89794d4b305d3d3d9ea38afab3ad86d4af8736c8150cfae75506161ba7ad29bf1626a07d8996c53fbda156d259fe4
@@ -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.2'
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,14 +1,14 @@
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.2
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
11
+ date: 2024-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick
@@ -92,10 +92,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: 2.5.0
95
+ version: 3.0.0
96
96
  - - "<"
97
97
  - !ruby/object:Gem::Version
98
- version: 3.2.0
98
+ version: 3.4.0
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="