letter_avatar 0.3.0 → 0.3.1

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: 8e4fdd1da9e28981d11834ba527b9ed7f9b49ad0
4
- data.tar.gz: bfec65d71a2cc9a95b5acf401458de53d7e61617
3
+ metadata.gz: 86eeb1acd3d42ef513e6f593a81f86106de3e6a2
4
+ data.tar.gz: 8744c5afa9950021d1a9b6b73841af1ed67495d0
5
5
  SHA512:
6
- metadata.gz: 71f343c18aca06719fbb0af9f37e7ca562324ee94f3676de66205db49ccfcc24ae7aa020e6fc8dd44f280c0726bc691fb9982258b244e8c5b17e6d8728a25d77
7
- data.tar.gz: 1fcbf2264ffe40e7bf482e25cb5f71cc70633832135369ff9658d598cec76a33cd744457b525e3806feecf46fa877be83a2d54559e5d7a1e2aa245766f8546b6
6
+ metadata.gz: f1802b86e0623cdf3a74c3d3d860cbfad4ea266efdb32c8f1ee224c8f60009f1ff471bce75fcadfe4ff27793ce10e63c7764ec92bb70266b39f5fc1cd1923ce7
7
+ data.tar.gz: 5ab055f302bc30c0238fb769c9df2e5696a482540c38afaa1a00452893607821193e74188ea5c3f21d7cd5d8f678510b15a70242b4d7efba0e1c53cb95327e3b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ 0.3.1
2
+ -----
3
+
4
+ - added `LetterAvatar.fill_color` config option.
5
+
6
+ 0.3.0
7
+ -----
8
+
9
+ - Removed `activesupport` dependency.
10
+
1
11
  0.2.0
2
12
  -----
3
13
 
data/README.md CHANGED
@@ -48,10 +48,11 @@ $ gem install letter_avatar
48
48
 
49
49
  ```ruby
50
50
  LetterAvatar.setup do |config|
51
- config.cache_base_path = 'public/system/lets' # default is 'public/system'
52
- config.colors_palette = :iwanthue # default is :google
53
- config.weight = 500 # default is 300
54
- config.annotate_position = '-0+10' # default is -0+5
51
+ config.fill_color = 'rgba(255, 255, 255, 1)' # default is 'rgba(255, 255, 255, 0.65)'
52
+ config.cache_base_path = 'public/system/lets' # default is 'public/system'
53
+ config.colors_palette = :iwanthue # default is :google
54
+ config.weight = 500 # default is 300
55
+ config.annotate_position = '-0+10' # default is -0+5
55
56
  end
56
57
  ```
57
58
 
@@ -68,7 +68,7 @@ module LetterAvatar
68
68
  -pointsize 140
69
69
  -font #{FONT_FILENAME}
70
70
  -weight #{LetterAvatar.weight}
71
- -fill '#{FILL_COLOR}'
71
+ -fill '#{LetterAvatar.fill_color}'
72
72
  -gravity Center
73
73
  -annotate #{LetterAvatar.annotate_position} '#{identity.letter}'
74
74
  '#{filename}'
@@ -8,6 +8,14 @@ module LetterAvatar
8
8
  @cache_base_path = v
9
9
  end
10
10
 
11
+ def fill_color
12
+ @fill_color || Avatar::FILL_COLOR
13
+ end
14
+
15
+ def fill_color=(v)
16
+ @fill_color = v
17
+ end
18
+
11
19
  def colors_palette
12
20
  @colors_palette ||= :google
13
21
  end
@@ -1,3 +1,3 @@
1
1
  module LetterAvatar
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Discourse Developers
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-05-30 00:00:00.000000000 Z
14
+ date: 2016-07-20 00:00:00.000000000 Z
15
15
  dependencies: []
16
16
  description: Gem for creating letter avatar from user's name
17
17
  email: