avatarly 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatarly.rb +2 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5e98906ebcb07d210eefb7bf69cfe6378a340a3
4
- data.tar.gz: 5ab8a99a4c0de9beb69dc74dc35d47752d6638a6
3
+ metadata.gz: f0081142c330446d431cfbdec11ce81263a2fb0c
4
+ data.tar.gz: ec658cc5995209171711dfedb97917efc07a2701
5
5
  SHA512:
6
- metadata.gz: 90d2e5d3dfcd089f6d3197270342ab8a07e518baad21ad0a0868a8d57189f05857f6bf73f0cf1e794653b2a4fac19293a0f4e6595f9333c7c0957e586389f397
7
- data.tar.gz: c15d4019c45bafde779263e5ca4da4f5501d6b1fd118581f556a30a193d61230c4738a9de41a3bfa0155a5e48cf64a6e884ebe54e5fac7fa7f657deaef471e56
6
+ metadata.gz: 2983b2c752403541f9091819de7cda4133d9aad53720a911f1ea3abd68bbea670de71b16e739b11ef4cc8ea7cb05ece3ca4d0b1bfd249214128ec5d037362cb7
7
+ data.tar.gz: 6f1a26653ea8d2ee3a3c878a894e20411dd87b4fc16c28de967a778f0092fac5864d2442a41d15e6f3d56087c5c29b2f593a75cd1f1fb86dea432237043e75d0
@@ -43,7 +43,7 @@ class Avatarly
43
43
  canvas.background_fill = opts[:background_color]
44
44
  end.draw
45
45
  image.format = opts[:format]
46
- draw_text(image, text, opts)
46
+ draw_text(image, text, opts) if text.length > 0
47
47
  image
48
48
  end
49
49
 
@@ -71,7 +71,7 @@ class Avatarly
71
71
  text = text.split(separator)
72
72
  text[0][0] + text[1][0]
73
73
  else
74
- text[0][0]
74
+ text[0] || ''
75
75
  end
76
76
  end
77
77
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatarly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukasz Odziewa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-10 00:00:00.000000000 Z
11
+ date: 2015-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick