boring_avatar 1.0.1 → 1.1.0

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: 76e0b48e0a05baf7f93639dad8a3a5bd6226d390485a40336712fb79e52c4e71
4
- data.tar.gz: bd9bc97ffd51fbf668054e72f39cf8953380fce529a27cc4bfe986efc83e2180
3
+ metadata.gz: 4b35dafd67e8e5a4aa93d5bcb6add2cef21edb46c9b40006ab8d2c64d2fecb50
4
+ data.tar.gz: 9f6302fcd596af87ece50f1a9432418d984ce20ab1570b998daa206f278b41ba
5
5
  SHA512:
6
- metadata.gz: 4b621f5123c033538e5a6655ab64eeac25f358829ef6ea1731f942da2ae905f8527e028850f5d9a77721eeab99da14acf6a4be8b1b08bf7093e072cd7ad620b0
7
- data.tar.gz: 6db7e9764af03859536437ee70679ab964d9a72262957a3df1d238353e6e9d6eb7cdfe40705e3805b8e78be8a3194a7f4da300cf27f186a24d7ef34bbff82b34
6
+ metadata.gz: ce9657797944976cbea5e2b27d2eaaf6cb55e063794b335459fad009f3760d2f0e48994f222fab691406f4d9ce6cf0010f602d23dce2b6fa34663cccff89985c
7
+ data.tar.gz: 3d034ce1f618e2289c084f56bb558aac19f5b9b6209d442a7b56b0599dea30c3d5f818b591e4757455c7424717dd2c5fe3dd45c314bf68f524baf7b2829e1903
@@ -3,7 +3,7 @@ name: Initial Pipeline
3
3
  agent:
4
4
  machine:
5
5
  type: e1-standard-2
6
- os_image: ubuntu1804
6
+ os_image: ubuntu2004
7
7
  blocks:
8
8
  - name: CI
9
9
  task:
@@ -11,7 +11,7 @@ blocks:
11
11
  - name: Test
12
12
  commands:
13
13
  - checkout
14
- - sem-version ruby 3.1.2
14
+ - sem-version ruby 3.2.2
15
15
  - cache restore
16
16
  - bundle config set --local deployment 'true'
17
17
  - bundle config set --local path 'vendor/bundle'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0 / 2023-06-27
4
+
5
+ - Ensure default options are set when nil
6
+
3
7
  ## 1.0.1 / 2022-09-23
4
8
 
5
9
  - Fix loading file issue
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- boring_avatar (1.0.1)
4
+ boring_avatar (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,4 +21,4 @@ DEPENDENCIES
21
21
  rake (~> 12.0)
22
22
 
23
23
  BUNDLED WITH
24
- 2.3.20
24
+ 2.3.25
@@ -9,9 +9,16 @@ module BoringAvatar
9
9
  attr_reader :colors, :name, :size, :opts, :num_from_name, :range
10
10
 
11
11
  def initialize(colors: COLORS, name: NAME, size: SIZE, **opts)
12
- @colors = colors == "random" ? Util.random_palette : colors
12
+ @colors = case
13
+ when colors == "random"
14
+ Util.random_palette
15
+ when colors.nil? || colors.empty?
16
+ COLORS
17
+ else
18
+ colors
19
+ end
13
20
  @name = name
14
- @size = size
21
+ @size = size.nil? ? SIZE : size
15
22
  @opts = opts
16
23
  @num_from_name = Util.get_number(name)
17
24
  @range = colors.length
@@ -1,3 +1,3 @@
1
1
  module BoringAvatar
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
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.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-23 00:00:00.000000000 Z
11
+ date: 2023-06-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a simple Ruby implementation of Boring Avatars library
14
14
  email: