avataaars 0.1.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22506ef6d3832340ae7ee752da4d9103c3ba47ae364993203bdf8c34b1d681f2
4
- data.tar.gz: 5698e255d4532bfbab6a16e951b185e9b4ea1b05fb496d9ee460fdd997fa264f
3
+ metadata.gz: f8a129025b2b6847cbc99cb661acee417401df787ece4ee7c1c44305305dae9a
4
+ data.tar.gz: 624f1bd3d22295cec2e5b771fdcb11bb062000bdf6b469dcdf4b466cec3eb592
5
5
  SHA512:
6
- metadata.gz: c8dea9db8ea218639410b6c108b7a902ff261cca5a786e994c59e5cbd7cfea08f1245285b70cd0887809c7686282aec7de37bf107cbfa06758df7ff5219a8654
7
- data.tar.gz: 69f23ca3fc06f974d4efa10c56117f0230d0ca40f3d88c493529a958a45970147934629993cb814908d9ab6ec334f3c7c5142da2e78090686d9b2f2ef344724d
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.1.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.1.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: 2021-12-22 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,17 +92,17 @@ 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.1.0
98
+ version: 3.4.0
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.2.32
105
+ rubygems_version: 3.3.7
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: A Ruby gem to transform attributes into avatar SVGs using the React avataaars