boring_avatar 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tool-versions +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -1
- data/lib/boring_avatar/util.rb +5 -4
- data/lib/boring_avatar/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d151685da16183ab2eb32f482d6840817b361f5fcd35235d8f880b3ed0cb7ca
|
4
|
+
data.tar.gz: 5eb897db226b9d5471967a7804a622e7c1c05dc505bb6b910209feff1acc1891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c133b5572416f5db3a7c2febe146d87cec5e6aa93663292b2cc09c7c9d0fecf48527f5f47c8c887cae52127873c8f1c543bb8a18bff72f1466124c41fde58dfc
|
7
|
+
data.tar.gz: f6c922f0e84380775cc038afb15e6bfef2a5b079171e54f85841f381e9320c7664135d9b45aefb2b96e7afac2a5256e8f5280d47cfde448d76625323be8cbab1
|
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby 3.
|
1
|
+
ruby 3.3.4
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/boring_avatar/util.rb
CHANGED
@@ -4,10 +4,11 @@ require "json"
|
|
4
4
|
|
5
5
|
module Util
|
6
6
|
class << self
|
7
|
-
def get_number(
|
8
|
-
|
9
|
-
.
|
10
|
-
.
|
7
|
+
def get_number(string)
|
8
|
+
string.chars.reduce(0) do |sum, char|
|
9
|
+
sum = (sum << 5) - sum + char.ord
|
10
|
+
[sum].pack("L").unpack("l").first
|
11
|
+
end.abs
|
11
12
|
end
|
12
13
|
|
13
14
|
def get_random_color(colors, number, range)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boring_avatar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a simple Ruby implementation of Boring Avatars library
|
14
14
|
email:
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubygems_version: 3.
|
64
|
+
rubygems_version: 3.5.16
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Generate Boring Avatars
|