letter_avatar 0.0.5 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +17 -0
- data/README.md +18 -3
- data/letter_avatar.gemspec +1 -2
- data/lib/letter_avatar/avatar.rb +5 -8
- data/lib/letter_avatar/avatar_helper.rb +18 -0
- data/lib/letter_avatar/colors.rb +238 -0
- data/lib/letter_avatar/has_avatar.rb +13 -0
- data/lib/letter_avatar/version.rb +1 -1
- data/lib/letter_avatar.rb +4 -227
- metadata +13 -24
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NGE0NWIwYzE2YmE3YTk2ZWI4NmJjMDM4MWFjMGQ2ZTRiMDlmZTY4Mw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 66ae9c282f11f12391afafad83393f1d8000888d
|
4
|
+
data.tar.gz: 308d700ce065aeb5c41b104e410148beaa06ec00
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
Yzg1ZDk3MzY2ZGM5OGYyZDQzMDEzNDI2MGEyZGEwZmFhNDE4OGZjN2I5YzMz
|
11
|
-
MDdlNjNmZmE3MThhNWUyMDQ1NzcxNjYzNGU5NmYzNTk0ODc0NWI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NTI1NTY4MjMzZGM2NGI0YTY1ZTMxMDJjMjVkMGU5ZjIzZmQ0NWUxYzcyZWMy
|
14
|
-
MjhkOGMwY2ZjMmZmNTNjNmEwYzA0M2UwYjEzNjc2MTA3ZTQzYTIyODM1YWQ2
|
15
|
-
NmVjZDQ0ZGU2ZTM0M2RmZGNiMjFiMjM5YmRjNzdjMTU1YjJjNDc=
|
6
|
+
metadata.gz: 2ee57eff7bd2178e004adb74dce6c889e3ceca86ab917ea5b542f568f7486494038dcfb8c1e14258043d635f50dfeab240d91ea17c5f8f0d20b50d7df45212b3
|
7
|
+
data.tar.gz: 7653d2f1d249655ff0b4a6863240304cb6c25dee24fe0156fe24cba1c006bfb3428647d46eb618e05ae944f30b39d5afef29212b8b8b2ea475c060cc54ae54cd
|
data/.gitignore
CHANGED
@@ -29,3 +29,20 @@ config/secrets.yml
|
|
29
29
|
/vendor/assets/bower_components
|
30
30
|
*.bowerrc
|
31
31
|
bower.json
|
32
|
+
*.gem
|
33
|
+
*.rbc
|
34
|
+
.bundle
|
35
|
+
.config
|
36
|
+
.yardoc
|
37
|
+
Gemfile.lock
|
38
|
+
InstalledFiles
|
39
|
+
_yardoc
|
40
|
+
coverage
|
41
|
+
doc/
|
42
|
+
lib/bundler/man
|
43
|
+
pkg
|
44
|
+
rdoc
|
45
|
+
spec/reports
|
46
|
+
test/tmp
|
47
|
+
test/version_tmp
|
48
|
+
tmp
|
data/README.md
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem for creating letter avatar from user's name.
|
4
4
|
|
5
|
-
Code extracted from discourse source (thanks guys!)
|
5
|
+
Code extracted from discourse source (thanks guys!) - I needed this functionality in three projects, so here's the gem! :-)
|
6
6
|
|
7
|
+
[![Code Climate](https://codeclimate.com/github/ksz2k/letter_avatar/badges/gpa.svg)](https://codeclimate.com/github/ksz2k/letter_avatar)
|
7
8
|
|
8
9
|
## Installation
|
9
10
|
|
10
11
|
System requirements
|
11
12
|
|
12
|
-
sudo apt-get install -y
|
13
|
+
sudo apt-get install -y imagemagick
|
13
14
|
|
14
15
|
Add this line to your application's Gemfile:
|
15
16
|
|
@@ -24,7 +25,7 @@ And then execute:
|
|
24
25
|
Or install it yourself as:
|
25
26
|
|
26
27
|
$ gem install letter_avatar
|
27
|
-
|
28
|
+
|
28
29
|
## Configuration
|
29
30
|
|
30
31
|
```ruby
|
@@ -40,6 +41,20 @@ LetterAvatar.generate 'ksz2k', 200
|
|
40
41
|
=> "public/system/letter_avatars/2/K/87_178_230/200.png"
|
41
42
|
```
|
42
43
|
|
44
|
+
There's also helper for this. To use it, you need:
|
45
|
+
|
46
|
+
* in your helper (eg. `ApplicationHelper`) or controller:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
include LetterAvatar::AvatarHelper
|
50
|
+
```
|
51
|
+
|
52
|
+
* and in your view:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
letter_avatar_for('ksz2k', 200)
|
56
|
+
```
|
57
|
+
|
43
58
|
## Contributing
|
44
59
|
|
45
60
|
1. Fork it
|
data/letter_avatar.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.summary = %q{Create nice initals avatars from your users usernames}
|
13
13
|
spec.homepage = "https://github.com/ksz2k/letter_avatar"
|
14
14
|
spec.license = "GPL"
|
15
|
-
|
15
|
+
|
16
16
|
spec.rubyforge_project = "letter_avatar"
|
17
17
|
|
18
18
|
spec.files = `git ls-files`.split($/)
|
@@ -22,5 +22,4 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "image_optim"
|
26
25
|
end
|
data/lib/letter_avatar/avatar.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "letter_avatar/colors"
|
2
|
+
|
1
3
|
module LetterAvatar
|
2
4
|
class Avatar
|
3
5
|
|
@@ -15,10 +17,8 @@ module LetterAvatar
|
|
15
17
|
|
16
18
|
def self.from_username(username)
|
17
19
|
identity = new
|
18
|
-
identity.color = LetterAvatar::
|
19
|
-
|
20
|
-
]
|
21
|
-
identity.letter = username[0].upcase
|
20
|
+
identity.color = LetterAvatar::Colors.for(username)
|
21
|
+
identity.letter = username.first.upcase
|
22
22
|
|
23
23
|
identity
|
24
24
|
end
|
@@ -71,17 +71,14 @@ module LetterAvatar
|
|
71
71
|
-pointsize 200
|
72
72
|
-fill white
|
73
73
|
-gravity Center
|
74
|
-
-font 'Helvetica'
|
75
74
|
-stroke #{to_rgb(stroke)}
|
76
75
|
-strokewidth 2
|
77
|
-
-annotate -5+
|
76
|
+
-annotate -5+20 '#{letter}'
|
78
77
|
'#{filename}'
|
79
78
|
}
|
80
79
|
|
81
80
|
`convert #{instructions.join(" ")}`
|
82
81
|
|
83
|
-
ImageOptim.new.optimize_image(filename) rescue nil
|
84
|
-
|
85
82
|
filename
|
86
83
|
end
|
87
84
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
module LetterAvatar
|
3
|
+
module AvatarHelper
|
4
|
+
|
5
|
+
def letter_avatar_for(name, size = 64)
|
6
|
+
LetterAvatar.generate(name, size)
|
7
|
+
end
|
8
|
+
|
9
|
+
def letter_avatar_url_for(avatar_path)
|
10
|
+
avatar_path.to_s.sub('public/','/')
|
11
|
+
end
|
12
|
+
|
13
|
+
def letter_avatar_tag(name, size = 64, options = {})
|
14
|
+
image_tag(letter_avatar_url_for(letter_avatar_for(name, size)), options)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,238 @@
|
|
1
|
+
module LetterAvatar
|
2
|
+
module Colors
|
3
|
+
|
4
|
+
def self.for(username)
|
5
|
+
all[
|
6
|
+
Digest::MD5.hexdigest(username)[0...15].to_i(16) % all.length
|
7
|
+
]
|
8
|
+
end
|
9
|
+
|
10
|
+
# palette of optimally disctinct colors
|
11
|
+
# cf. http://tools.medialab.sciences-po.fr/iwanthue/index.php
|
12
|
+
# parameters used:
|
13
|
+
# - H: 0 - 360
|
14
|
+
# - C: 0 - 2
|
15
|
+
# - L: 0.75 - 1.5
|
16
|
+
def self.all
|
17
|
+
[
|
18
|
+
[198,125,40],
|
19
|
+
[61,155,243],
|
20
|
+
[74,243,75],
|
21
|
+
[238,89,166],
|
22
|
+
[52,240,224],
|
23
|
+
[177,156,155],
|
24
|
+
[240,120,145],
|
25
|
+
[111,154,78],
|
26
|
+
[237,179,245],
|
27
|
+
[237,101,95],
|
28
|
+
[89,239,155],
|
29
|
+
[43,254,70],
|
30
|
+
[163,212,245],
|
31
|
+
[65,152,142],
|
32
|
+
[165,135,246],
|
33
|
+
[181,166,38],
|
34
|
+
[187,229,206],
|
35
|
+
[77,164,25],
|
36
|
+
[179,246,101],
|
37
|
+
[234,93,37],
|
38
|
+
[225,155,115],
|
39
|
+
[142,140,188],
|
40
|
+
[223,120,140],
|
41
|
+
[249,174,27],
|
42
|
+
[244,117,225],
|
43
|
+
[137,141,102],
|
44
|
+
[75,191,146],
|
45
|
+
[188,239,142],
|
46
|
+
[164,199,145],
|
47
|
+
[173,120,149],
|
48
|
+
[59,195,89],
|
49
|
+
[222,198,220],
|
50
|
+
[68,145,187],
|
51
|
+
[236,204,179],
|
52
|
+
[159,195,72],
|
53
|
+
[188,121,189],
|
54
|
+
[166,160,85],
|
55
|
+
[181,233,37],
|
56
|
+
[236,177,85],
|
57
|
+
[121,147,160],
|
58
|
+
[234,218,110],
|
59
|
+
[241,157,191],
|
60
|
+
[62,200,234],
|
61
|
+
[133,243,34],
|
62
|
+
[88,149,110],
|
63
|
+
[59,228,248],
|
64
|
+
[183,119,118],
|
65
|
+
[251,195,45],
|
66
|
+
[113,196,122],
|
67
|
+
[197,115,70],
|
68
|
+
[80,175,187],
|
69
|
+
[103,231,238],
|
70
|
+
[240,72,133],
|
71
|
+
[228,149,241],
|
72
|
+
[180,188,159],
|
73
|
+
[172,132,85],
|
74
|
+
[180,135,251],
|
75
|
+
[236,194,58],
|
76
|
+
[217,176,109],
|
77
|
+
[88,244,199],
|
78
|
+
[186,157,239],
|
79
|
+
[113,230,96],
|
80
|
+
[206,115,165],
|
81
|
+
[244,178,163],
|
82
|
+
[230,139,26],
|
83
|
+
[241,125,89],
|
84
|
+
[83,160,66],
|
85
|
+
[107,190,166],
|
86
|
+
[197,161,210],
|
87
|
+
[198,203,245],
|
88
|
+
[238,117,19],
|
89
|
+
[228,119,116],
|
90
|
+
[131,156,41],
|
91
|
+
[145,178,168],
|
92
|
+
[139,170,220],
|
93
|
+
[233,95,125],
|
94
|
+
[87,178,230],
|
95
|
+
[157,200,119],
|
96
|
+
[237,140,76],
|
97
|
+
[229,185,186],
|
98
|
+
[144,206,212],
|
99
|
+
[236,209,158],
|
100
|
+
[185,189,79],
|
101
|
+
[34,208,66],
|
102
|
+
[84,238,129],
|
103
|
+
[133,140,134],
|
104
|
+
[67,157,94],
|
105
|
+
[168,179,25],
|
106
|
+
[140,145,240],
|
107
|
+
[151,241,125],
|
108
|
+
[67,162,107],
|
109
|
+
[200,156,21],
|
110
|
+
[169,173,189],
|
111
|
+
[226,116,189],
|
112
|
+
[133,231,191],
|
113
|
+
[194,161,63],
|
114
|
+
[241,77,99],
|
115
|
+
[241,217,53],
|
116
|
+
[123,204,105],
|
117
|
+
[210,201,119],
|
118
|
+
[229,108,155],
|
119
|
+
[240,91,72],
|
120
|
+
[187,115,210],
|
121
|
+
[240,163,100],
|
122
|
+
[178,217,57],
|
123
|
+
[179,135,116],
|
124
|
+
[204,211,24],
|
125
|
+
[186,135,57],
|
126
|
+
[223,176,135],
|
127
|
+
[204,148,151],
|
128
|
+
[116,223,50],
|
129
|
+
[95,195,46],
|
130
|
+
[123,160,236],
|
131
|
+
[181,172,131],
|
132
|
+
[142,220,202],
|
133
|
+
[240,140,112],
|
134
|
+
[172,145,164],
|
135
|
+
[228,124,45],
|
136
|
+
[135,151,243],
|
137
|
+
[42,205,125],
|
138
|
+
[192,233,116],
|
139
|
+
[119,170,114],
|
140
|
+
[158,138,26],
|
141
|
+
[73,190,183],
|
142
|
+
[185,229,243],
|
143
|
+
[227,107,55],
|
144
|
+
[196,205,202],
|
145
|
+
[132,143,60],
|
146
|
+
[233,192,237],
|
147
|
+
[62,150,220],
|
148
|
+
[205,201,141],
|
149
|
+
[106,140,190],
|
150
|
+
[161,131,205],
|
151
|
+
[135,134,158],
|
152
|
+
[198,139,81],
|
153
|
+
[115,171,32],
|
154
|
+
[101,181,67],
|
155
|
+
[149,137,119],
|
156
|
+
[37,142,183],
|
157
|
+
[183,130,175],
|
158
|
+
[168,125,133],
|
159
|
+
[124,142,87],
|
160
|
+
[236,156,171],
|
161
|
+
[232,194,91],
|
162
|
+
[219,200,69],
|
163
|
+
[144,219,34],
|
164
|
+
[219,95,187],
|
165
|
+
[145,154,217],
|
166
|
+
[165,185,100],
|
167
|
+
[127,238,163],
|
168
|
+
[224,178,198],
|
169
|
+
[119,153,120],
|
170
|
+
[124,212,92],
|
171
|
+
[172,161,105],
|
172
|
+
[231,155,135],
|
173
|
+
[157,132,101],
|
174
|
+
[122,185,146],
|
175
|
+
[53,166,51],
|
176
|
+
[70,163,90],
|
177
|
+
[150,190,213],
|
178
|
+
[210,107,60],
|
179
|
+
[166,152,185],
|
180
|
+
[159,194,159],
|
181
|
+
[39,141,222],
|
182
|
+
[202,176,161],
|
183
|
+
[95,140,229],
|
184
|
+
[168,142,87],
|
185
|
+
[93,170,203],
|
186
|
+
[159,142,54],
|
187
|
+
[14,168,39],
|
188
|
+
[94,150,149],
|
189
|
+
[187,206,136],
|
190
|
+
[157,224,166],
|
191
|
+
[235,158,208],
|
192
|
+
[109,232,216],
|
193
|
+
[141,201,87],
|
194
|
+
[208,124,118],
|
195
|
+
[142,125,214],
|
196
|
+
[19,237,174],
|
197
|
+
[72,219,41],
|
198
|
+
[234,102,111],
|
199
|
+
[168,142,79],
|
200
|
+
[188,135,35],
|
201
|
+
[95,155,143],
|
202
|
+
[148,173,116],
|
203
|
+
[223,112,95],
|
204
|
+
[228,128,236],
|
205
|
+
[206,114,54],
|
206
|
+
[195,119,88],
|
207
|
+
[235,140,94],
|
208
|
+
[235,202,125],
|
209
|
+
[233,155,153],
|
210
|
+
[214,214,238],
|
211
|
+
[246,200,35],
|
212
|
+
[151,125,171],
|
213
|
+
[132,145,172],
|
214
|
+
[131,142,118],
|
215
|
+
[199,126,150],
|
216
|
+
[61,162,123],
|
217
|
+
[58,176,151],
|
218
|
+
[215,141,69],
|
219
|
+
[225,154,220],
|
220
|
+
[220,77,167],
|
221
|
+
[233,161,64],
|
222
|
+
[130,221,137],
|
223
|
+
[81,191,129],
|
224
|
+
[169,162,140],
|
225
|
+
[174,177,222],
|
226
|
+
[236,174,47],
|
227
|
+
[233,188,180],
|
228
|
+
[69,222,172],
|
229
|
+
[71,232,93],
|
230
|
+
[118,211,238],
|
231
|
+
[157,224,83],
|
232
|
+
[218,105,73],
|
233
|
+
[126,169,36]
|
234
|
+
]
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
end
|
data/lib/letter_avatar.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require "letter_avatar/version"
|
2
2
|
require "letter_avatar/avatar"
|
3
|
+
require "letter_avatar/avatar_helper"
|
3
4
|
|
4
5
|
module LetterAvatar
|
5
|
-
|
6
|
+
|
6
7
|
mattr_accessor :cache_base_path
|
7
8
|
@@cache_base_path = nil
|
8
|
-
|
9
|
+
|
9
10
|
def self.setup(&block)
|
10
11
|
yield(self)
|
11
12
|
end
|
@@ -27,238 +28,14 @@ module LetterAvatar
|
|
27
28
|
`convert #{instructions}`
|
28
29
|
|
29
30
|
if $?.exitstatus == 0
|
30
|
-
ImageOptim.new.optimize_image(to) rescue nil
|
31
31
|
true
|
32
32
|
else
|
33
33
|
false
|
34
34
|
end
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
def self.generate(username, size)
|
38
38
|
Avatar.generate(username, size)
|
39
39
|
end
|
40
|
-
|
41
|
-
# palette of optimally disctinct colors
|
42
|
-
# cf. http://tools.medialab.sciences-po.fr/iwanthue/index.php
|
43
|
-
# parameters used:
|
44
|
-
# - H: 0 - 360
|
45
|
-
# - C: 0 - 2
|
46
|
-
# - L: 0.75 - 1.5
|
47
|
-
COLORS = [[198,125,40],
|
48
|
-
[61,155,243],
|
49
|
-
[74,243,75],
|
50
|
-
[238,89,166],
|
51
|
-
[52,240,224],
|
52
|
-
[177,156,155],
|
53
|
-
[240,120,145],
|
54
|
-
[111,154,78],
|
55
|
-
[237,179,245],
|
56
|
-
[237,101,95],
|
57
|
-
[89,239,155],
|
58
|
-
[43,254,70],
|
59
|
-
[163,212,245],
|
60
|
-
[65,152,142],
|
61
|
-
[165,135,246],
|
62
|
-
[181,166,38],
|
63
|
-
[187,229,206],
|
64
|
-
[77,164,25],
|
65
|
-
[179,246,101],
|
66
|
-
[234,93,37],
|
67
|
-
[225,155,115],
|
68
|
-
[142,140,188],
|
69
|
-
[223,120,140],
|
70
|
-
[249,174,27],
|
71
|
-
[244,117,225],
|
72
|
-
[137,141,102],
|
73
|
-
[75,191,146],
|
74
|
-
[188,239,142],
|
75
|
-
[164,199,145],
|
76
|
-
[173,120,149],
|
77
|
-
[59,195,89],
|
78
|
-
[222,198,220],
|
79
|
-
[68,145,187],
|
80
|
-
[236,204,179],
|
81
|
-
[159,195,72],
|
82
|
-
[188,121,189],
|
83
|
-
[166,160,85],
|
84
|
-
[181,233,37],
|
85
|
-
[236,177,85],
|
86
|
-
[121,147,160],
|
87
|
-
[234,218,110],
|
88
|
-
[241,157,191],
|
89
|
-
[62,200,234],
|
90
|
-
[133,243,34],
|
91
|
-
[88,149,110],
|
92
|
-
[59,228,248],
|
93
|
-
[183,119,118],
|
94
|
-
[251,195,45],
|
95
|
-
[113,196,122],
|
96
|
-
[197,115,70],
|
97
|
-
[80,175,187],
|
98
|
-
[103,231,238],
|
99
|
-
[240,72,133],
|
100
|
-
[228,149,241],
|
101
|
-
[180,188,159],
|
102
|
-
[172,132,85],
|
103
|
-
[180,135,251],
|
104
|
-
[236,194,58],
|
105
|
-
[217,176,109],
|
106
|
-
[88,244,199],
|
107
|
-
[186,157,239],
|
108
|
-
[113,230,96],
|
109
|
-
[206,115,165],
|
110
|
-
[244,178,163],
|
111
|
-
[230,139,26],
|
112
|
-
[241,125,89],
|
113
|
-
[83,160,66],
|
114
|
-
[107,190,166],
|
115
|
-
[197,161,210],
|
116
|
-
[198,203,245],
|
117
|
-
[238,117,19],
|
118
|
-
[228,119,116],
|
119
|
-
[131,156,41],
|
120
|
-
[145,178,168],
|
121
|
-
[139,170,220],
|
122
|
-
[233,95,125],
|
123
|
-
[87,178,230],
|
124
|
-
[157,200,119],
|
125
|
-
[237,140,76],
|
126
|
-
[229,185,186],
|
127
|
-
[144,206,212],
|
128
|
-
[236,209,158],
|
129
|
-
[185,189,79],
|
130
|
-
[34,208,66],
|
131
|
-
[84,238,129],
|
132
|
-
[133,140,134],
|
133
|
-
[67,157,94],
|
134
|
-
[168,179,25],
|
135
|
-
[140,145,240],
|
136
|
-
[151,241,125],
|
137
|
-
[67,162,107],
|
138
|
-
[200,156,21],
|
139
|
-
[169,173,189],
|
140
|
-
[226,116,189],
|
141
|
-
[133,231,191],
|
142
|
-
[194,161,63],
|
143
|
-
[241,77,99],
|
144
|
-
[241,217,53],
|
145
|
-
[123,204,105],
|
146
|
-
[210,201,119],
|
147
|
-
[229,108,155],
|
148
|
-
[240,91,72],
|
149
|
-
[187,115,210],
|
150
|
-
[240,163,100],
|
151
|
-
[178,217,57],
|
152
|
-
[179,135,116],
|
153
|
-
[204,211,24],
|
154
|
-
[186,135,57],
|
155
|
-
[223,176,135],
|
156
|
-
[204,148,151],
|
157
|
-
[116,223,50],
|
158
|
-
[95,195,46],
|
159
|
-
[123,160,236],
|
160
|
-
[181,172,131],
|
161
|
-
[142,220,202],
|
162
|
-
[240,140,112],
|
163
|
-
[172,145,164],
|
164
|
-
[228,124,45],
|
165
|
-
[135,151,243],
|
166
|
-
[42,205,125],
|
167
|
-
[192,233,116],
|
168
|
-
[119,170,114],
|
169
|
-
[158,138,26],
|
170
|
-
[73,190,183],
|
171
|
-
[185,229,243],
|
172
|
-
[227,107,55],
|
173
|
-
[196,205,202],
|
174
|
-
[132,143,60],
|
175
|
-
[233,192,237],
|
176
|
-
[62,150,220],
|
177
|
-
[205,201,141],
|
178
|
-
[106,140,190],
|
179
|
-
[161,131,205],
|
180
|
-
[135,134,158],
|
181
|
-
[198,139,81],
|
182
|
-
[115,171,32],
|
183
|
-
[101,181,67],
|
184
|
-
[149,137,119],
|
185
|
-
[37,142,183],
|
186
|
-
[183,130,175],
|
187
|
-
[168,125,133],
|
188
|
-
[124,142,87],
|
189
|
-
[236,156,171],
|
190
|
-
[232,194,91],
|
191
|
-
[219,200,69],
|
192
|
-
[144,219,34],
|
193
|
-
[219,95,187],
|
194
|
-
[145,154,217],
|
195
|
-
[165,185,100],
|
196
|
-
[127,238,163],
|
197
|
-
[224,178,198],
|
198
|
-
[119,153,120],
|
199
|
-
[124,212,92],
|
200
|
-
[172,161,105],
|
201
|
-
[231,155,135],
|
202
|
-
[157,132,101],
|
203
|
-
[122,185,146],
|
204
|
-
[53,166,51],
|
205
|
-
[70,163,90],
|
206
|
-
[150,190,213],
|
207
|
-
[210,107,60],
|
208
|
-
[166,152,185],
|
209
|
-
[159,194,159],
|
210
|
-
[39,141,222],
|
211
|
-
[202,176,161],
|
212
|
-
[95,140,229],
|
213
|
-
[168,142,87],
|
214
|
-
[93,170,203],
|
215
|
-
[159,142,54],
|
216
|
-
[14,168,39],
|
217
|
-
[94,150,149],
|
218
|
-
[187,206,136],
|
219
|
-
[157,224,166],
|
220
|
-
[235,158,208],
|
221
|
-
[109,232,216],
|
222
|
-
[141,201,87],
|
223
|
-
[208,124,118],
|
224
|
-
[142,125,214],
|
225
|
-
[19,237,174],
|
226
|
-
[72,219,41],
|
227
|
-
[234,102,111],
|
228
|
-
[168,142,79],
|
229
|
-
[188,135,35],
|
230
|
-
[95,155,143],
|
231
|
-
[148,173,116],
|
232
|
-
[223,112,95],
|
233
|
-
[228,128,236],
|
234
|
-
[206,114,54],
|
235
|
-
[195,119,88],
|
236
|
-
[235,140,94],
|
237
|
-
[235,202,125],
|
238
|
-
[233,155,153],
|
239
|
-
[214,214,238],
|
240
|
-
[246,200,35],
|
241
|
-
[151,125,171],
|
242
|
-
[132,145,172],
|
243
|
-
[131,142,118],
|
244
|
-
[199,126,150],
|
245
|
-
[61,162,123],
|
246
|
-
[58,176,151],
|
247
|
-
[215,141,69],
|
248
|
-
[225,154,220],
|
249
|
-
[220,77,167],
|
250
|
-
[233,161,64],
|
251
|
-
[130,221,137],
|
252
|
-
[81,191,129],
|
253
|
-
[169,162,140],
|
254
|
-
[174,177,222],
|
255
|
-
[236,174,47],
|
256
|
-
[233,188,180],
|
257
|
-
[69,222,172],
|
258
|
-
[71,232,93],
|
259
|
-
[118,211,238],
|
260
|
-
[157,224,83],
|
261
|
-
[218,105,73],
|
262
|
-
[126,169,36]]
|
263
40
|
|
264
41
|
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.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- discourse developers
|
@@ -9,48 +9,34 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.3'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.3'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: image_optim
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ! '>='
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ! '>='
|
39
|
+
- - ">="
|
54
40
|
- !ruby/object:Gem::Version
|
55
41
|
version: '0'
|
56
42
|
description: Gem for creating letter avatar from user's name
|
@@ -60,7 +46,7 @@ executables: []
|
|
60
46
|
extensions: []
|
61
47
|
extra_rdoc_files: []
|
62
48
|
files:
|
63
|
-
- .gitignore
|
49
|
+
- ".gitignore"
|
64
50
|
- Gemfile
|
65
51
|
- LICENSE.txt
|
66
52
|
- README.md
|
@@ -68,6 +54,9 @@ files:
|
|
68
54
|
- letter_avatar.gemspec
|
69
55
|
- lib/letter_avatar.rb
|
70
56
|
- lib/letter_avatar/avatar.rb
|
57
|
+
- lib/letter_avatar/avatar_helper.rb
|
58
|
+
- lib/letter_avatar/colors.rb
|
59
|
+
- lib/letter_avatar/has_avatar.rb
|
71
60
|
- lib/letter_avatar/version.rb
|
72
61
|
homepage: https://github.com/ksz2k/letter_avatar
|
73
62
|
licenses:
|
@@ -79,17 +68,17 @@ require_paths:
|
|
79
68
|
- lib
|
80
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
70
|
requirements:
|
82
|
-
- -
|
71
|
+
- - ">="
|
83
72
|
- !ruby/object:Gem::Version
|
84
73
|
version: '0'
|
85
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
75
|
requirements:
|
87
|
-
- -
|
76
|
+
- - ">="
|
88
77
|
- !ruby/object:Gem::Version
|
89
78
|
version: '0'
|
90
79
|
requirements: []
|
91
80
|
rubyforge_project: letter_avatar
|
92
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.4.6
|
93
82
|
signing_key:
|
94
83
|
specification_version: 4
|
95
84
|
summary: Create nice initals avatars from your users usernames
|