letter_avatar 0.1.5.1 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 344754077816c1f567817421bbeb9c8d112b15cf
4
- data.tar.gz: ff752788eb2bf96ba60f7bb79992fe5f325e7590
3
+ metadata.gz: bba34004fd9198351087e9bf2a684a11b4d6593c
4
+ data.tar.gz: 95b0b43bb13237a9ec432bd54c3f785494bced46
5
5
  SHA512:
6
- metadata.gz: dd57f05bb70c590d8e86feeeb874d5cf4035160e83afcecef5b675369c79e16742e87b031e3249a3cddefea8aec6181a2c9063b3ba6b97ab21df84fa1241e201
7
- data.tar.gz: 305d5c73fff434b4f874d889943a51a840e40f1d62bae0e27f5478c7b2914bfee126148a031687a3de467532d6f0bc24bc5e36b05784bf9a36ed946ad3cdce1f
6
+ metadata.gz: 7c5f9c0ae4d685b60b1063b857b228c5116e48c6e2c3d7412a18f65f643845040ee2a3ae1ff58b2f69b43b038991762b1acd3450bb69a0b1f2e949ad77b447ab
7
+ data.tar.gz: 2ddd0b96509c758bb027aaddf8f838c6ea6bc723d75a7a8559376ea6440ea31c0323ce1a7e3c332b5c5f1ef475d35d669a05aa63f951a9b34199b1ad80bdacf9
@@ -79,7 +79,7 @@ module LetterAvatar
79
79
  -weight 300
80
80
  -fill '#{FILL_COLOR}'
81
81
  -gravity Center
82
- -annotate -0+5 '#{letter}'
82
+ -annotate #{annotate_position} '#{letter}'
83
83
  '#{filename}'
84
84
  )
85
85
 
@@ -95,6 +95,10 @@ module LetterAvatar
95
95
  filename
96
96
  end
97
97
 
98
+ def annotate_position
99
+ LetterAvatar.colors_palette == :google ? '-0+5' : '-0+10'
100
+ end
101
+
98
102
  def darken(color,pct)
99
103
  color.map do |n|
100
104
  (n.to_f * pct).to_i
@@ -1,3 +1,3 @@
1
1
  module LetterAvatar
2
- VERSION = "0.1.5.1"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letter_avatar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5.1
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - discourse developers