superavatar 0.0.2 → 0.0.4

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: 93335ffca2acdaf312d15aec1db6d009d42773a1af730d3332b9583df371f84e
4
- data.tar.gz: dfc75804b85bac862aa8b6feaa3c962acb9f12685aef305122e73c90e1b96f97
3
+ metadata.gz: 2398e1f9b7167dd2fada7725fb8a0b9046aea85cca0c7ac9af24b48619bde665
4
+ data.tar.gz: 7d4982f4a433e205f36f0862a5bb158eeff7ac2d9e47061b6991b8886d94b969
5
5
  SHA512:
6
- metadata.gz: 5a4bbb246b120a8b5bc173469b326c3d4bf7bf5dc702dbecd6158c759fa950b3927cdd8bfc23e4475cd554784fe31262dfb8547888fe8af6c1ea59447769ac32
7
- data.tar.gz: a99fcb498c2193f994748c31e726b0e47d9b2b917375230428d7204142abe90897be0232aef67ce58b65b9d164e80a284d409fcfe275f536e7acd57e1a2a0167
6
+ metadata.gz: 274d5bdd5c8ab11d2dc9eac85a8ecf66a32511212c3989af3888df1abd5170c014eab9579f563ea651d16868c13c43b1f019755cadb899ee86c470b040d0aac7
7
+ data.tar.gz: f0cefe6b5f08500b95a151c269ca2f252066dc34a79cc8e82b4405fabc6af41a249ada290e707bf67dfd1669571109e1b749227b5a0aebb49112100ccf91af9a
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Superavatar
4
+ class Avatar
5
+ attr_accessor :github_username, :avatar_url
6
+
7
+ def initialize
8
+ @github_username = nil
9
+ @avatar_url = nil
10
+ yield self if block_given?
11
+ end
12
+
13
+ def avatar_url
14
+ return fetch_avatar_url if @avatar_url.nil?
15
+ @avatar_url
16
+ end
17
+
18
+ private
19
+
20
+ def fetch_avatar_url
21
+ @avatar_url = Superavatar::Sources::Github.new(@github_username).get_avatar_url unless @github_username.nil?
22
+ rescue StandardError => e
23
+ puts "Error fetching the avatar_url: #{e.message}"
24
+ end
25
+ end
26
+ end
File without changes
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Superavatar
4
+ class Configuration
5
+ attr_accessor :enable_github
6
+
7
+ def initialize
8
+ @enable_github = true
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Superavatar
2
+ module LocalSources
3
+ class Base
4
+ @@svg_files = {}
5
+
6
+ def self.sample_svg
7
+ @@svg_files.values.sample
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ ## Source: https://www.dicebear.com/playground?style=open-peeps
2
+ ## Disclaimer: The avatars used in this class have been sourced from https://www.dicebear.com/styles/open-peeps. The creator of this gem has no affiliation with the authors of the avatars, and all rights belong to their respective creators. This disclaimer is included to ensure that the gem's users are aware of the proper attribution and to prevent any potential legal issues.
3
+
4
+ module Superavatar
5
+ module LocalSources
6
+ class DiceBear < Base
7
+ @@svg_files = {
8
+ boo: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 704 704" fill="none" shape-rendering="auto"><desc>"Open Peeps" by "Pablo Stanley", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.com</desc><metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:RDF><cc:Work><dc:title>Open Peeps</dc:title><dc:creator><cc:Agent rdf:about="https://twitter.com/pablostanley"><dc:title>Pablo Stanley</dc:title></cc:Agent></dc:creator><dc:source>https://www.openpeeps.com/</dc:source><cc:license rdf:resource="https://creativecommons.org/publicdomain/zero/1.0/" /></cc:Work></rdf:RDF></metadata><mask id="viewboxMask"><rect width="704" height="704" rx="0" ry="0" x="0" y="0" fill="#fff" /></mask><g mask="url(#viewboxMask)"><g fill-rule="evenodd" clip-rule="evenodd"><path d="M705.3 1074a2351.1 2351.1 0 0 1-15.6-101c-1-7.7-2.5-16.4 2.7-22 7.3-8 14-14.8 14.8-26.2.8-10.7-2.8-22.4-5-32.8a809.4 809.4 0 0 0-17.3-64.7c-6.6-21.7-13.9-43.2-21.3-64.6-6.9-20-13.5-40.3-22.5-59.5-17-36.5-46-63.5-81.6-81.6-9-4.5-27-20.5-36.3-24-8.5-3.4-8.5 6.3-16.9 2.6-6.7-2.9-13-6.7-16.7-13.2-4-7-14.3-16.9-15.9-25-3.3-17.4.3-32.2-12-45.3a90 90 0 0 0-41.1-23.8c-33.7-9.3-78.5-2.8-98.8 28.5-9.7 14.9-13 33-26.2 45.1-11.4 10.7-8.8 18-23.6 23.4-.9.3-23.6-4.5-24.4-4.2-16.2-3.5-31.7 6.2-46.5 11.8a325.4 325.4 0 0 0-63 32.3 399.2 399.2 0 0 0-102.3 98.5 482.5 482.5 0 0 0-76.4 161c-1.7 6.4-3.5 13-1.5 19.4 1.7 5.3 5.4 9.2 9.8 12.4 6 4.3 18 7 17.7 15.7-.1 6.6-2.4 13.5-3.5 20-1.3 7.7-2.3 15.5-3.4 23.2-4.8 35.4-8.6 71-10.3 106.6a920 920 0 0 0-.5 106c.1 2.3.8 4.5 2 6.2-1 .4-1.2 2.4.1 2.7l2.7.5a12 12 0 0 0 7 2.4l5.5.2c19.3 4 38.6 7.9 58.1 10.8 23.8 3.5 47.6 6.3 71.5 8.7 49.2 4.8 98 3.2 147.1.6a1877 1877 0 0 1 147.4-2c49.2 1.4 98.4 3.5 147.6 4.4 55 1 110-.5 164.8-5 7.5-.5 12.2-6.5 10.7-14-8.9-44.7-19-89.1-27-134Z" fill="#d08b5b"/><path d="m201 597.5 1.2-.4c14.5-5.7 29.6-14.8 45.4-11.4.5-.2 10.8 1.9 17.9 3.2l-6.7 7L247 598c40.7 67.1 88.8 100.7 144.3 100.7 55.5 0 97.7-33.6 126.4-100.7l4-1c.4 0 1 .2 1.5.4 9.3 3.6 27.4 19.6 36.3 24.1 35.6 18 64.5 45 81.6 81.6 8.7 18.6 15.2 38 21.8 57.5l.7 2c7.4 21.4 14.7 43 21.3 64.6 6.3 20.4 12 41 16.6 61.8l.7 2.9c2.2 10.4 5.8 22 5 32.8a29 29 0 0 1-3 10.7l-80.4 29 38.4 261.3c-35.1 1.5-70.3 2-105.5 1.3-49.2-.9-98.4-3-147.6-4.3-47.7-1.2-95.3-.7-143 1.7l-12 .6a946.3 946.3 0 0 1-139.5-1l-3.1-.3v-38.3l16.3-212.9-83-15.6-81.3-39.5a21.7 21.7 0 0 1-5.6-8.8c-1.9-6-.5-12 1-18l.5-1.3a492.8 492.8 0 0 1 76.4-161A399.3 399.3 0 0 1 138 629.7c19.8-13 40.9-23.9 63-32.3Z" fill="#8fa7df"/><path d="M232.2 584.6c5.1-.3 10.3.6 15.4 1 .4.1.6.8 0 .9-9 1.9-18 4.5-26.9 7.1l-3.8 1.2c-10 3-19.8 6-29.6 10-19.4 7.9-37.8 18.5-54.8 30.8C67.2 682.8 20 754.3-9.9 828.3a526 526 0 0 0-24.3 77c-.4 1.6-2 5.4-1 7 .7 1.3 3.6 2.1 5 2.9l4.5 2.3 25.2 12.9 2.3 1.1c38 18.6 78.4 34.4 121 35.5l.4-3.7a342 342 0 0 1 9.9-60c.3-1 1.6-.6 1.7.3 3 23.1 2 46.4 1 69.7-1.8 41-4.3 82.2-6.5 123.3-1.2 20.6-2.6 41-3.9 61.7-1.3 20.5-1.7 41.6-4.7 62-.6 4.6-6 7-10 6.6-4.4-.5-7.9-4.5-8-9 0-11.9 1.5-24 2.4-35.8l2.5-33.8c3.1-41.1 6.8-82.2 10.2-123.3a4771 4771 0 0 1 3.8-43.7C76.4 979.8 34.2 963-6.1 943.5c-.6 13.2-2 26.5-3.4 39.6-3.8 36.8-7.1 73.6-9.6 110.5a2254.2 2254.2 0 0 0-4.2 92.7l-.2 7c0 4.4-.5 8.5-4.3 11.7-3.7 3.3-8.9 3.5-12.6 0-5-4.6-4.2-10.9-4-17.1a1675.6 1675.6 0 0 1 1.8-47.2 1321 1321 0 0 1 10.5-109.5l2-14c3.5-26 7.5-52.7 15.5-77.9-3.1-1.5-6.2-3-9.3-4.7-5.5-2.7-11.2-5.4-16.6-8.4-4.2-2.5-7.9-5.8-9-10.8-1.4-5.5.6-11.5 2-16.9v-.4a502 502 0 0 1 26.6-80 523.2 523.2 0 0 1 67.8-117 353.8 353.8 0 0 1 88.7-83.3 239 239 0 0 1 53.8-25.7 142.6 142.6 0 0 1 42.8-7.5Zm90.1-66c6-6.5 18.1.2 15.2 8.8a108.2 108.2 0 0 1-34.7 52A79.4 79.4 0 0 1 247 598l1.7 2.4a321.1 321.1 0 0 0 46.1 52.6c36 31.2 84.8 48 132 36 37.1-9.4 69.8-38.8 79.4-76.2-1.3.6-3 .9-4.8.5-7.7-1.7-15.3-9.8-20.3-15.6-5.3-6.3-9.5-13-12.6-20.7-5.6-14-7.4-32.1.3-45.7 1-1.7 3-.7 3.3 1l.3 2.5c1.5 12.7 3.3 25 9.3 36.6a76 76 0 0 0 18.2 23.1c2.6 2 5.8 3.6 8.1 6l.5.4c.6-5 4.1-7.3 7.6-7.2 3.3.2 7.3 1.6 8.8 2.3l.1.1a341 341 0 0 1 65.1 42 259 259 0 0 1 88.4 129c7.5 25.3 11.8 51.4 16.3 77.4l2.8 16c4.2 23.9 8.9 48.4 18.4 70.7 2.5 5.7.6 11.1-5.5 13.4A1493 1493 0 0 1 688 953c3.7 16 6 32.5 8.7 48.5 6 34.1 13.2 68 19.4 102 3.2 17.5 6.1 35 9.3 52.3l4.7 25.2 2.4 13.6.1.7c.5 2.4 1 4.9.4 7.3-.8 2.7-2.9 4.6-4.8 6.6-1.6 1.6-3.8 1.6-5.7.7l-.7-.3c-3.4-1.6-6-3.2-7.3-7-.7-2.5-1-5.2-1.5-7.7a3535.6 3535.6 0 0 1-7.8-43.6l-1.6-9.1c-5.2-31.4-10.2-62.9-12.8-94.5-1-14-2.3-28.1-3.5-42.2l-.9-10.5c-1.1-13.3-2.5-27-2.7-40.5l-4.5 1.6L657 964c-5.5 2-12.5 6-18.4 5.2-2.9-.3-5-1.2-6.8-2.9 2 28.8 4.8 57.4 8.5 86a1965.7 1965.7 0 0 0 22 135c.6 3.2 1.4 6.4 1.9 9.6.5 3.7-.5 5.9-2.5 9-1.7 2.4-5 3.7-7.8 2-3.6-2.3-5.5-4.3-6.5-8.4-1-3.7-1.6-7.6-2.3-11.4a1654.2 1654.2 0 0 1-11.4-65.2c-7.8-52-12.7-104.4-15.2-156.8a1388 1388 0 0 1-1.4-77.8c0-13.3.5-26.6 1.4-39.9 1-13.4 3-26.5 4.8-39.8 0-.5.7-.5.7 0 .8 14.9 2.1 29.8 2.8 44.7.6 14.3.9 28.5 1.4 42.8.6 18.7 1.5 37.5 2.7 56.2a9.6 9.6 0 0 1 8.5-3.1c4.7-1 9.7-3.4 14.1-5l16.8-5.5 26.4-8.7a679 679 0 0 1-18-80.8l-2-12.3c-4-24.2-8.5-48.5-15.8-72a229.8 229.8 0 0 0-34.8-68.2 370.2 370.2 0 0 0-52.7-55.3C557 627 539.7 614 523 600c.1.9.2 2 0 3-3.5 25.9-17 50-35.8 67.9-37.7 36-93.6 43.4-142 26.5-46.7-16.3-88-55-102.6-102.8-.3-.8.8-1 1.3-.5l2.4 3.3c0-.4.2-.9.7-1a129 129 0 0 0 46.6-29.2 100.2 100.2 0 0 0 21.3-33.3l.4-1c1.7-5 3.2-10.2 7-14.2Z" fill="#000"/></g><g transform="matrix(.99789 0 0 1 156 62)"><g fill-rule="evenodd" clip-rule="evenodd"><path d="M236.5 86.8c48.7 0 142.9 56.6 142.9 56.6s44.2 185.2 35.3 238c-9 53-55.3 117.8-132.1 117.8s-97.7-27.1-116.2-39.4c-18.4-12.3-55.7-68.4-55.7-68.4s-25.2 7.9-32.7 3.3c-10.5-6.4-9.2-23.4-12.5-39.9-2.5-12-10.8-24-10.8-30.7 0-24.5 17.4-22.8 26.1-28.6-19.2-19-14.1-84.5 10-119 24.2-34.4 96.9-89.7 145.7-89.7Z" fill="#d08b5b"/><path d="M324.2 45c4.3-.6 7.7 5.4 3.2 7.6-19.3 9.5-39.4 16.6-59 25.2 10 1.2 20.2 3.1 30 6 11.4-4.6 23-8.4 35-11l3.8-.9c12.2-2.7 26-5.2 37.8-1 4 1.3 3.8 6.5 0 8-6.9 2.6-14.5 3.3-21.8 4.2a236.8 236.8 0 0 0-37.5 7.3 175.6 175.6 0 0 1 53.6 41.1 159.6 159.6 0 0 1 28.4 48.1 71 71 0 0 1 3.5 14.4c.6 4 .2 7.8.3 11.6.2 0 .4.3.4.5 2.4 9.3 2.7 19.4 3.4 29 .8 9.8 1.6 19.7 2.2 29.6.7 9.9.6 20.2 2.4 29.9 1.7 8.8 6.7 16.6 9.5 25.2 16.8 51.2.4 112.6-40.5 148a142 142 0 0 1-73.4 33 147.5 147.5 0 0 1-61.7-4.7l-2.4-.7a53 53 0 0 1-7.8-3c-3.5-1.7-5-4.7-6.3-8.2-.7-2.2.5-5.6 2.6-6.5l.7-.3c3.8-1.6 6.8-2.2 10.8-.7a124 124 0 0 0 72 4.8c24.4-5.4 46.9-17.8 63.8-36.3a127.7 127.7 0 0 0 27.5-120.6c-1-3.4-2.3-6.7-3.4-10.1-1-3-1.3-6.4-1.7-9.6l-.1-.7c-1.2-8.1-.8-16.4-.8-24.6v-24.8l.1-9.3.1-9.4c-1 .2-2.5-.6-2.6-2-.4-5-1.5-9.8-2.2-14.8l-.1-1.3a46 46 0 0 0-3.3-13.4c-3.9-8.6-6.6-17.7-10.3-26.3a140.8 140.8 0 0 0-31.7-46.3 140.3 140.3 0 0 0-57.9-33l-2 .9a238.7 238.7 0 0 0-57.2 35.6l-8.4 7.4a199.4 199.4 0 0 0-5.9 5.4c-1.7 1.2-1.8 3 0 5.2.5-.2 1 .8.4 1-3.4 1.8-6-2-5.3-5 .6-2.6 2.9-4.8 4.5-6.8l.2-.2c2.5-3.1 5-6.2 7.8-9.1 14.4-15.4 31.4-28 49.7-38.2a154.7 154.7 0 0 0-36.8-2.2 416.6 416.6 0 0 0-45.7 28.8c-1.4 1-3.6 2.3-4.7 3.6-.9 1-3.2 5.6-.2 5.5.3 0 .4.5 0 .5-2.6.7-3-2.1-2.5-4.2 1.1-5.3 8.2-9.5 12.1-12.8l.3-.2c8-6.8 16.2-13.3 24.7-19.5a168 168 0 0 0-73.5 30.4 200.2 200.2 0 0 0-63.3 81c-6.7 15-12.3 31-14.2 47.4-1.8 14.6 0 30.7 11.5 41h1.9l1-.1c8.1-.5 25.1 0 24.6 11.3 0 .5-.8.8-1 .3-2.7-5.8-10.5-4.8-16-3.9l-3.2.5a54 54 0 0 0-18.8 5.9 22.4 22.4 0 0 0-11.4 14.9c-1 6.4 3.2 11.2 6.9 16a31.7 31.7 0 0 1 7.9 17.7c.4 7-3 14-2 20.9 2.2 15.4 24.6 10.4 34.2 8 2.9-.6 6.9.5 8.2 3.4a128.8 128.8 0 0 0 43.5 52.6c6.4 4.4 12.6 8 17 14.6 1.7 2.6-.6 5.4-3.3 5.6-8.6.8-15.6-3.5-22.4-8.3a137.4 137.4 0 0 1-45.1-52.5l-1 .1c-14.8 2.8-31.2 2.8-40.8-10.8-4.2-6-4.7-13-3.6-20.1 1-7 3.6-13.4-.3-19.9C55 345 50 340.1 48 333.4c-2-6.5-.9-13.4 2-19.4 5.6-11.5 17.1-17.2 29.2-19-14.5-8.8-19.4-26.6-19.4-43 0-20.4 7.2-41 15.4-59.5a203.3 203.3 0 0 1 73.4-86.4A182 182 0 0 1 249 76.6c9-5.5 18.4-10.5 28-15.2l2-1c14.5-7 29-12.8 45-15.3ZM75.8 328.3c1.8-4.2 9.5-4.2 13.2-4h.7c11 .5 29.5 5 31.8 17.5.4 2-1 4.8-3.5 4.6-3.6-.4-6.4-1-9.4-3.2L107 342c-2.6-1.8-5-3.5-7.9-5-3.4-1.8-6.9-3.1-10.6-4.2l-4.6-1.2-3-.8c-1.2-.7-2-.2-2.3 1.4.4.2.4 1-.2 1-2.2-.3-3.5-2.9-2.7-5Zm35.4-18v4.6-4.6Z" fill="#000"/></g></g><g transform="translate(315 248)"><path fill-rule="evenodd" clip-rule="evenodd" d="M176 239.6c-6.4 0-13.5-2.3-18.4-4.2l-1.2-.5a33.4 33.4 0 0 1-11.6-6.8 13 13 0 0 1-2.7-3.4c-.3-.8-.4-1.5-.1-2.3a40 40 0 0 0 3.3-.4l1.3-.2 4 .3.5.1 3 .4c3 .4 6 .8 9 1 2.2 0 4.5 0 6.8-.2 6-.3 12-.8 16.7 3.4a5 5 0 0 1 1.7 3.9c0 1.7-.8 3.4-1.9 4.8-2.4 3-6.2 4.1-10.4 4.1ZM211 186a15 15 0 0 1-13.8 6.6 82.3 82.3 0 0 1-38.2-12.2 10.6 10.6 0 0 1-4.9-7.8l-.5-5.4-3.1 4.5-1 1.4a175.2 175.2 0 0 0-11.5 19.7 91.4 91.4 0 0 0-4.7 12.5c-2.3 7.3-4.6 14.5-9.6 19.6-.8.8-2 1-3 1-1-.2-1.9-.6-2.3-1.5-6-12.3 2-27 8.6-37.2l.7-1c6-9.3 16-21.5 27.4-23.2l1.3 2 1.8-1.2c3.1-2 7.2-2 10.8-.3l3.6 1.6a99.7 99.7 0 0 0 23.4 7.8 97.9 97.9 0 0 0-3-10.8c-3-7.7-7.6-14.9-12.2-21.7l-.5-.8-2-3c-3.6-5.1-7.5-10.6-7.8-16.1 4.7.3 8.6 3.2 12 5.7 4.8 3.5 9.1 7.4 13.1 11.7 7.7 8.4 14.6 19 17.7 30.1 1.7 6.3 1 13.1-2.3 18ZM87.6 123v-.2c0-6.4 3.7-21 13-21 5.7 0 9.1 10 9.7 20.2v.4c.3 6.4-1.4 20.2-9.8 20.2S87.7 129.4 87.6 123Zm135.2-2v-.2c0-6.4-3.8-21-13-21-5.5 0-9 9.5-9.7 19.4v.8c-.4 6.1 1.2 20.6 9.8 20.6 8.4 0 12.8-13.1 12.9-19.6ZM118.5 79.8a167.8 167.8 0 0 0-33.8 8 437.2 437.2 0 0 0-25 9.5c-3.3 1.3-6.5 2.7-9.8 3.8a93.7 93.7 0 0 1 34.7-27c7.3-3.7 15-6.6 22.8-9l4.3-1.3c6.4-1.9 13.4-3.6 19.3.2a9.5 9.5 0 0 1 4.4 6.2 9 9 0 0 1-1.8 7.3c-1.4 1.9-3.3 3-5.2 3.4a10 10 0 0 1-6.5-1.2H118.5Zm96 1.2a52.4 52.4 0 0 0-18.7-.5c-3 .5-6 1-9.2.4-1.6-.3-3-1.3-4.1-2.6a10.6 10.6 0 0 1-2.4-5.2c-.3-1.8 0-3.5.6-5 .9-1.6 2.2-3 3.9-4.3 5-3.8 13.7-3 19.6-2.1 5.9.7 11.7 2.5 16.9 5.4 5.1 2.9 9.6 6.7 13 11.4 3 4 4.3 8.5 5.8 13.2-6.7-5.6-17-8.9-25.5-10.7Z" fill="#000"/></g><g transform="translate(279 400)"><path fill-rule="evenodd" clip-rule="evenodd" d="M237.6 65.9c2.7 2.8 5.4 5.8 7.8 9 .7 4.8.9 9.8.3 15-1 7.5-3 14.8-5.8 21.8-1.6-.2-3.2-.7-4.8-1.4-5-2.3-7.7-6.9-11-11-6.8-8-19-12.8-27.6-4.4-3.7 3.6-6.1 8.7-9.4 12.7-3.7 4.4-7.8 8.6-12 12.4l-1.7 1.5-7-8.3a80.9 80.9 0 0 1-15.8-27.8c-1-3.2-1.6-6.7-1.8-10.1a54 54 0 0 1 10.4-10c11.8-8.6 25.5-10 39.7-10.7 14.7-.8 28 .2 38.7 11.3Zm35.8 39.6C273 99.8 272 94 270.7 88c-4.8-22-15-44-35.7-54a48.3 48.3 0 0 0-31.4-4.2c-18.4-7-39 .1-53.4 12.8-17.2 14.9-25 38.3-27.8 60.2-1.8 15.3-2.5 35.6 1.8 46.7 4.4 11 31.9 40.7 71.1 40.9 56 .3 69.5-37.4 71.2-40.7a79.3 79.3 0 0 0 7-44Z" fill="#000"/></g><g transform="translate(179 343)"></g><g transform="translate(203 303)"><path fill-rule="evenodd" clip-rule="evenodd" d="m399 13.2-2.5-.4a39 39 0 0 0-8.3-1.9C359.7 4.7 293.7 13.8 291 38c-9 3-17 .4-27.4.6-8-33.5-146.6-28.8-153.3-8.6-6.5-2-16-1.5-23.3-1.8-15.6-.3-31.3 1-46.6 4.4C11.6 37-27.5 42.5-7.6 78.3c3.5 3.5 9.3.7 9.5-4-6.7-17 8.5-19 20.1-24 29-10.4 58.6-11.8 88.5-8.6 2.3 2.7 5.7 5 9.3 6.2 20 3.3 9.5 18.2 22.2 20.3-2.3 51.9 60.6 80.2 97 46.1 14.6-14.2 18.1-35.3 21.5-54.3a5 5 0 0 0 3.6-2.7c4.3-4.3 7-8.2 15.4-9.4 8.5-1.2 15 1.2 16 1.9l.7 1.3c.4.7 1 1.2 1.5 1.7-8.4 51.6 31.7 84.2 72.2 57.5 17.5-16.6 21.3-41.9 22-64.5a6.8 6.8 0 0 0 3-7.7c-1-4.9 1.6-9 5.8-11.1 5.5-2.8 4.6-12.7-1.8-13.8ZM225 37.7c-5-1-7 6.7-2 7.8 3.5.8 6.5 2.6 8.6 5.6l.2.3c2.7 4.4 9.7.4 7-4-3.2-5-8-8.4-13.7-9.7ZM372.3 33c-1.8-1.2-4.5-.3-5.5 1.5-1.1 2-.4 4 1.3 5.3l.1.2c1.6 1 3 3 3.2 5v.2c.2 5.1 8.2 5.1 8 0-.2-5.1-3-9.3-7.1-12.2Z" fill="#000"/></g></g></svg>',
9
+ peanut: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 704 704" fill="none" shape-rendering="auto"><desc>"Open Peeps" by "Pablo Stanley", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.com</desc><metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:RDF><cc:Work><dc:title>Open Peeps</dc:title><dc:creator><cc:Agent rdf:about="https://twitter.com/pablostanley"><dc:title>Pablo Stanley</dc:title></cc:Agent></dc:creator><dc:source>https://www.openpeeps.com/</dc:source><cc:license rdf:resource="https://creativecommons.org/publicdomain/zero/1.0/" /></cc:Work></rdf:RDF></metadata><mask id="viewboxMask"><rect width="704" height="704" rx="0" ry="0" x="0" y="0" fill="#fff" /></mask><g mask="url(#viewboxMask)"><g fill-rule="evenodd" clip-rule="evenodd"><path d="M705.3 1074a2351.1 2351.1 0 0 1-15.6-101c-1-7.7-2.5-16.4 2.7-22 7.3-8 14-14.8 14.8-26.2.8-10.7-2.8-22.4-5-32.8a809.4 809.4 0 0 0-17.3-64.7c-6.6-21.7-13.9-43.2-21.3-64.6-6.9-20-13.5-40.3-22.5-59.5-17-36.5-46-63.5-81.6-81.6-9-4.5-27-20.5-36.3-24-8.5-3.4-8.5 6.3-16.9 2.6-6.7-2.9-13-6.7-16.7-13.2-4-7-14.3-16.9-15.9-25-3.3-17.4.3-32.2-12-45.3a90 90 0 0 0-41.1-23.8c-33.7-9.3-78.5-2.8-98.8 28.5-9.7 14.9-13 33-26.2 45.1-11.4 10.7-8.8 18-23.6 23.4-.9.3-23.6-4.5-24.4-4.2-16.2-3.5-31.7 6.2-46.5 11.8a325.4 325.4 0 0 0-63 32.3 399.2 399.2 0 0 0-102.3 98.5 482.5 482.5 0 0 0-76.4 161c-1.7 6.4-3.5 13-1.5 19.4 1.7 5.3 5.4 9.2 9.8 12.4 6 4.3 18 7 17.7 15.7-.1 6.6-2.4 13.5-3.5 20-1.3 7.7-2.3 15.5-3.4 23.2-4.8 35.4-8.6 71-10.3 106.6a920 920 0 0 0-.5 106c.1 2.3.8 4.5 2 6.2-1 .4-1.2 2.4.1 2.7l2.7.5a12 12 0 0 0 7 2.4l5.5.2c19.3 4 38.6 7.9 58.1 10.8 23.8 3.5 47.6 6.3 71.5 8.7 49.2 4.8 98 3.2 147.1.6a1877 1877 0 0 1 147.4-2c49.2 1.4 98.4 3.5 147.6 4.4 55 1 110-.5 164.8-5 7.5-.5 12.2-6.5 10.7-14-8.9-44.7-19-89.1-27-134Z" fill="#ae5d29"/><path d="m201 597.5 1.2-.4c14.5-5.7 29.6-14.8 45.4-11.4.5-.2 10.8 1.9 17.9 3.2l-6.7 7L247 598c40.7 67.1 88.8 100.7 144.3 100.7 55.5 0 97.7-33.6 126.4-100.7l4-1c.4 0 1 .2 1.5.4 9.3 3.6 27.4 19.6 36.3 24.1 35.6 18 64.5 45 81.6 81.6 8.7 18.6 15.2 38 21.8 57.5l.7 2c7.4 21.4 14.7 43 21.3 64.6 6.3 20.4 12 41 16.6 61.8l.7 2.9c2.2 10.4 5.8 22 5 32.8a29 29 0 0 1-3 10.7l-80.4 29 38.4 261.3c-35.1 1.5-70.3 2-105.5 1.3-49.2-.9-98.4-3-147.6-4.3-47.7-1.2-95.3-.7-143 1.7l-12 .6a946.3 946.3 0 0 1-139.5-1l-3.1-.3v-38.3l16.3-212.9-83-15.6-81.3-39.5a21.7 21.7 0 0 1-5.6-8.8c-1.9-6-.5-12 1-18l.5-1.3a492.8 492.8 0 0 1 76.4-161A399.3 399.3 0 0 1 138 629.7c19.8-13 40.9-23.9 63-32.3Z" fill="#8fa7df"/><path d="M232.2 584.6c5.1-.3 10.3.6 15.4 1 .4.1.6.8 0 .9-9 1.9-18 4.5-26.9 7.1l-3.8 1.2c-10 3-19.8 6-29.6 10-19.4 7.9-37.8 18.5-54.8 30.8C67.2 682.8 20 754.3-9.9 828.3a526 526 0 0 0-24.3 77c-.4 1.6-2 5.4-1 7 .7 1.3 3.6 2.1 5 2.9l4.5 2.3 25.2 12.9 2.3 1.1c38 18.6 78.4 34.4 121 35.5l.4-3.7a342 342 0 0 1 9.9-60c.3-1 1.6-.6 1.7.3 3 23.1 2 46.4 1 69.7-1.8 41-4.3 82.2-6.5 123.3-1.2 20.6-2.6 41-3.9 61.7-1.3 20.5-1.7 41.6-4.7 62-.6 4.6-6 7-10 6.6-4.4-.5-7.9-4.5-8-9 0-11.9 1.5-24 2.4-35.8l2.5-33.8c3.1-41.1 6.8-82.2 10.2-123.3a4771 4771 0 0 1 3.8-43.7C76.4 979.8 34.2 963-6.1 943.5c-.6 13.2-2 26.5-3.4 39.6-3.8 36.8-7.1 73.6-9.6 110.5a2254.2 2254.2 0 0 0-4.2 92.7l-.2 7c0 4.4-.5 8.5-4.3 11.7-3.7 3.3-8.9 3.5-12.6 0-5-4.6-4.2-10.9-4-17.1a1675.6 1675.6 0 0 1 1.8-47.2 1321 1321 0 0 1 10.5-109.5l2-14c3.5-26 7.5-52.7 15.5-77.9-3.1-1.5-6.2-3-9.3-4.7-5.5-2.7-11.2-5.4-16.6-8.4-4.2-2.5-7.9-5.8-9-10.8-1.4-5.5.6-11.5 2-16.9v-.4a502 502 0 0 1 26.6-80 523.2 523.2 0 0 1 67.8-117 353.8 353.8 0 0 1 88.7-83.3 239 239 0 0 1 53.8-25.7 142.6 142.6 0 0 1 42.8-7.5Zm90.1-66c6-6.5 18.1.2 15.2 8.8a108.2 108.2 0 0 1-34.7 52A79.4 79.4 0 0 1 247 598l1.7 2.4a321.1 321.1 0 0 0 46.1 52.6c36 31.2 84.8 48 132 36 37.1-9.4 69.8-38.8 79.4-76.2-1.3.6-3 .9-4.8.5-7.7-1.7-15.3-9.8-20.3-15.6-5.3-6.3-9.5-13-12.6-20.7-5.6-14-7.4-32.1.3-45.7 1-1.7 3-.7 3.3 1l.3 2.5c1.5 12.7 3.3 25 9.3 36.6a76 76 0 0 0 18.2 23.1c2.6 2 5.8 3.6 8.1 6l.5.4c.6-5 4.1-7.3 7.6-7.2 3.3.2 7.3 1.6 8.8 2.3l.1.1a341 341 0 0 1 65.1 42 259 259 0 0 1 88.4 129c7.5 25.3 11.8 51.4 16.3 77.4l2.8 16c4.2 23.9 8.9 48.4 18.4 70.7 2.5 5.7.6 11.1-5.5 13.4A1493 1493 0 0 1 688 953c3.7 16 6 32.5 8.7 48.5 6 34.1 13.2 68 19.4 102 3.2 17.5 6.1 35 9.3 52.3l4.7 25.2 2.4 13.6.1.7c.5 2.4 1 4.9.4 7.3-.8 2.7-2.9 4.6-4.8 6.6-1.6 1.6-3.8 1.6-5.7.7l-.7-.3c-3.4-1.6-6-3.2-7.3-7-.7-2.5-1-5.2-1.5-7.7a3535.6 3535.6 0 0 1-7.8-43.6l-1.6-9.1c-5.2-31.4-10.2-62.9-12.8-94.5-1-14-2.3-28.1-3.5-42.2l-.9-10.5c-1.1-13.3-2.5-27-2.7-40.5l-4.5 1.6L657 964c-5.5 2-12.5 6-18.4 5.2-2.9-.3-5-1.2-6.8-2.9 2 28.8 4.8 57.4 8.5 86a1965.7 1965.7 0 0 0 22 135c.6 3.2 1.4 6.4 1.9 9.6.5 3.7-.5 5.9-2.5 9-1.7 2.4-5 3.7-7.8 2-3.6-2.3-5.5-4.3-6.5-8.4-1-3.7-1.6-7.6-2.3-11.4a1654.2 1654.2 0 0 1-11.4-65.2c-7.8-52-12.7-104.4-15.2-156.8a1388 1388 0 0 1-1.4-77.8c0-13.3.5-26.6 1.4-39.9 1-13.4 3-26.5 4.8-39.8 0-.5.7-.5.7 0 .8 14.9 2.1 29.8 2.8 44.7.6 14.3.9 28.5 1.4 42.8.6 18.7 1.5 37.5 2.7 56.2a9.6 9.6 0 0 1 8.5-3.1c4.7-1 9.7-3.4 14.1-5l16.8-5.5 26.4-8.7a679 679 0 0 1-18-80.8l-2-12.3c-4-24.2-8.5-48.5-15.8-72a229.8 229.8 0 0 0-34.8-68.2 370.2 370.2 0 0 0-52.7-55.3C557 627 539.7 614 523 600c.1.9.2 2 0 3-3.5 25.9-17 50-35.8 67.9-37.7 36-93.6 43.4-142 26.5-46.7-16.3-88-55-102.6-102.8-.3-.8.8-1 1.3-.5l2.4 3.3c0-.4.2-.9.7-1a129 129 0 0 0 46.6-29.2 100.2 100.2 0 0 0 21.3-33.3l.4-1c1.7-5 3.2-10.2 7-14.2Z" fill="#000"/></g><g transform="matrix(.99789 0 0 1 156 62)"><g fill-rule="evenodd" clip-rule="evenodd"><path d="M120.4 26.5c63-3.4 118.9-21.1 163.2 18.5 0 0 71.8-53.6 83.8-33.2 8 13.7-3.1 32-.2 49 19.5 33 18.4 89.2 19.5 102.4 2.8 33.1 20.2 157.9 20.2 187.5 0 15.1-12.4 54.7-20.2 76.8-17.3 49-50.3 74-104.4 74-54 0-142.4-45.2-170.7-85.3-2.5-3.5-18.5 6.7-35.3-11C58 385.7 48 349 48 327c0-27.8-18-47.1-15.9-82.8 4.7-79.5 21-214 88.3-217.8Z" fill="#ae5d29"/><path d="M367.4 11.6c8 13.7-3 32 0 49 7.4 12.7 11.9 29 14.6 44.8l-14.8 7.8-5.4.8c-88.2 13-144.6 24.7-169 35.1-24.6 10.5-54.5 47.5-89.7 110.8l-1 2-7 47.2-32 9.8-15 7.1c-.4-27.3-18-46.6-16-81.9 4.7-79.5 21-214 88.4-217.8 63-3.4 118.8-21.1 163.2 18.5C331.5 9.1 359.4-2 367.4 11.6Z" fill="#8fa7df"/><path d="M113.4-66h2.5l2.7.4a22 22 0 0 1 12 6.8l.2.3a31 31 0 0 1 4.1 3.7l.7-.6 2-1.6c3-2.6 6.6-4.5 10.4-5.6l.5-.1h.3c2.7-1 5.6-1.4 8.4-1.4 3.5-.1 6.9.4 10 1.7 3.9 1.6 7.2 4 10 7 1.8 1.6 3.4 3.2 5 5a37.5 37.5 0 0 1 8.6 14.9 170.7 170.7 0 0 1 27-1.3 132.3 132.3 0 0 1 45.9 9.9c3.6 1.4 7.1 3.3 10.4 5.5l2.8 1.7 4.1 2.5c3.2 2 6.3 4.4 9.2 7A99.8 99.8 0 0 1 301.1 0c6.3 3.4 12 7.8 17.2 13a128.4 128.4 0 0 1 28.2-11.9 98.6 98.6 0 0 1 18.8-3.5l4.1-.3 1.8-.2h1.5c.4-.1 1 .9 1 1.3l.1.3.9 1h.8c.7 0 1.6 1.3 2.1 1.9l.4.4a4 4 0 0 1 1 2c.6 4.1 1 8.3 1.5 12.5.1 3.1 0 6.2-.5 9.3l-1.2 9-2 6.3-.7 2.4c-1.6 5.3-3.5 10.4-5.7 15.4 1.6 1.8 3.1 3.6 4.5 5.6l1 1 .4-.3c.5-.2.8 0 1.1.4 3.2 3 5.4 6.6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.2 67-.8.2.4 1 1-.8c-.2 0-.4-.2-.6-.4Zm71.8-81.2c1.8-.6 3.2-.8 4.1-.3-1.4 0-2.7.2-4 .3Z" fill="#000"/></g></g><g transform="translate(315 248)"><path fill-rule="evenodd" clip-rule="evenodd" d="m182.2 226 .7-.2c5.6-1.3 10.9-3 16 .4 5 3.2 5.6 9.2 1.8 13.6-4 4.6-9.2 4.3-14.7 4.4h-.3a135.2 135.2 0 0 1-26.5-2.2l-2.5-.5c-2.5-.5-5-1.2-6.3-3.6-2.3-4.3 14.6-7.7 16.7-8.2 5-1.5 10-2.6 15.1-3.7Zm9.4-51.6a23.2 23.2 0 0 1-10.2 5.9c-10 3-23 1.4-31.1-1.7-1.7-.6-3.3-1.9-4.3-3.5a5.8 5.8 0 0 1-.4-5c.1-.5.4-1 .6-1.4a6 6 0 0 1 3.3-3 7 7 0 0 1 4.5-.3l.6.2c5.2 1.6 13.7 4.4 20.8 3.8 4.3-.3 8-1.8 10-5.7 1-2 .7-4-.2-5.9-1.4-2.8-4.1-5.2-6.4-6.9-3.3-2.4-6.7-3.3-10.3-4.3l-4-1.2c-.5-.2-1-.5-1.2-.8-.3-.4-.5-.9-.6-1.3 0-.5 0-1 .3-1.4.2-.4.5-.7 1-1 7-3 16-1 22.8 4 3.4 2.4 6.3 5.5 8 9a17 17 0 0 1 1.7 10.6c-.7 4.1-2.4 7.4-4.9 9.9ZM77.1 104.6c2-1 3.6 3.1 4 4.2l.9 2.3a26 26 0 0 0 5.7 10.2c2.4 2.3 6.3 4.3 9 1.6 2.7-2.6 1.4-5.4 1.8-8.6.7-5.6 8.4-11.3 13-5.4 10.5 13.4-5.7 31.9-20.6 28.6a23 23 0 0 1-16.2-15l-.1-.3c-1.5-4.6-3-15.2 2.5-17.6Zm135.1 9.2v-.1c-5-11.4 12.7-16.2 14.3-6v.6c1.5 11.3-1.6 26.5-15.4 27.7-15.6 1.2-22-16.1-20.6-28.8.2-2.3 3-2.6 3.8-.6l.2.5c2.5 6.4 4.9 18.7 13.7 18.7 6 0 5.7-8 4-12ZM223.5 81c9-.3 9 13.7 0 13.9-29.8.7-59.6 1.6-89.4 1.8h-5.5c-28 .2-56 .6-84-1.8-2.4-.2-2-3.5 0-3.4 29.3-4.2 59-5.4 88.5-7 30-1.6 60.3-2.4 90.4-3.5Z" fill="#000"/></g><g transform="translate(279 400)"><path fill-rule="evenodd" clip-rule="evenodd" d="M230 34c11.7.8 22.7 8 32.8 13.7a67 67 0 0 1 22.6 24l.4.6c.3.5-.3 1-.8.9-9.6-4.9-19.6-8.7-29-14-9-5.6-20.3-7.5-29.5-12.6-5.2-4-3.6-12.3 3.4-12.6Zm-30.5 5.7c.4 2.7-.7 6.9-4.2 8.1-6.1 2.2-11.8 3.4-18 5l-8 2.3c-15.4 4.4-31 9-44.7 15.9l-.4-.2c-10-6.2 44.8-32 63.7-36.2 3.5-.8 11 1 11.6 5Z" fill="#000"/></g><g transform="translate(179 343)"></g><g transform="translate(203 303)"></g></g></svg>'
10
+ }
11
+ end
12
+ end
13
+ end
@@ -5,20 +5,23 @@ module Superavatar
5
5
  class Github
6
6
  def initialize(username)
7
7
  @username = username
8
+ @avatar_url = nil
8
9
  end
9
10
 
10
- def avatar_url
11
- res = api_profile
12
- p res
13
- # JSON.parse(res)[:avatar_url]
11
+ def get_avatar_url
12
+ return @avatar_url unless @avatar_url.nil?
13
+
14
+ url = api_profile_endpoint
15
+ github_res = Superavatar::Utils::Apiclient.fetch_external_api(url)
16
+ @avatar_url = github_res.fetch('avatar_url')
14
17
  end
15
18
 
16
19
  def web_profile
17
20
  "https://github.com/#{@username}/"
18
21
  end
19
22
 
20
- def api_profile
21
- "https://api.github.com/users/#{@username}/"
23
+ def api_profile_endpoint
24
+ "https://api.github.com/users/#{@username}"
22
25
  end
23
26
  end
24
27
  end
@@ -1,25 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Superavatar::APIClient
3
+ # Superavatar::Apiclient
4
4
  #
5
5
  # Fetches external resources
6
6
  #
7
7
  module Superavatar
8
- module APIClient
9
- class Fetch
10
- require 'net/http'
11
- require 'json'
12
- require 'open-uri'
8
+ module Utils
9
+ class Apiclient
10
+ require 'net/http'
11
+ require 'json'
12
+ require 'open-uri'
13
13
 
14
- def self.fetch_external_api(url, json=true)
15
- begin
16
- puts 'Fetching...'
17
- response = URI.open(url).read
18
- response
19
- JSON.parse(response) if json==true
20
- rescue StandardError => e
21
- puts 'Request failed #{e.message}'
22
- end
14
+ def self.test_me
15
+ puts 'Testing from APIClient::Fetch'
16
+ end
17
+
18
+ def self.fetch_external_api(url, json = true)
19
+ puts 'Fetching from...'
20
+ puts url
21
+ response = URI.open(url).read
22
+ return JSON.parse(response) if json == true
23
+
24
+ response
25
+ rescue StandardError => e
26
+ puts "Request failed #{e.message}"
27
+ end
23
28
  end
24
29
  end
25
30
  end
data/lib/superavatar.rb CHANGED
@@ -1,16 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  #
4
- # Superavatar
5
-
6
- #require_relative 'sources/github'
7
- require_relative 'superavatar/sources/github'
8
- require_relative 'superavatar/utils/apiclient'
9
- # Provides avatars for your users
4
+ # Superavatar gem entrypoint
10
5
  #
11
6
  module Superavatar
12
- # Tester method
13
- def self.talk
14
- 'Talking init'
7
+ require 'superavatar/configuration'
8
+ require 'superavatar/utils/apiclient'
9
+
10
+ ## External sources
11
+ require 'superavatar/sources/github'
12
+
13
+ ## Local sources
14
+ require 'superavatar/local_sources/base'
15
+ require 'superavatar/local_sources/dice_bear'
16
+
17
+ ## Main class
18
+ require 'superavatar/avatar'
19
+
20
+ def self.configure
21
+ yield(configuration) if block_given?
22
+ end
23
+
24
+ def self.configuration
25
+ @configuration ||= Configuration.new
15
26
  end
27
+
16
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superavatar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Arce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-08 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A gem to get your users' backup avatar from public resources
14
14
  email: martin.arce.teixeira@gmail.com
@@ -17,6 +17,11 @@ extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
19
  - lib/superavatar.rb
20
+ - lib/superavatar/avatar.rb
21
+ - lib/superavatar/avatar_loader.rb
22
+ - lib/superavatar/configuration.rb
23
+ - lib/superavatar/local_sources/base.rb
24
+ - lib/superavatar/local_sources/dice_bear.rb
20
25
  - lib/superavatar/sources/github.rb
21
26
  - lib/superavatar/utils/apiclient.rb
22
27
  homepage: https://github.com/divagueame/superavatar