letter_avatar 0.2.0 → 0.3.0

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: c55c3d79ff3c533932714985087ed6492d67d212
4
- data.tar.gz: e1e0ce051c935209780bee2fb3ac5a751acda9cb
3
+ metadata.gz: 8e4fdd1da9e28981d11834ba527b9ed7f9b49ad0
4
+ data.tar.gz: bfec65d71a2cc9a95b5acf401458de53d7e61617
5
5
  SHA512:
6
- metadata.gz: e68c68315b536f0953c270f939d002217d2c62f8a04adaaa98efaec49cbdaea2a12209038497d1713b05be5e23b1c31cc6449e2c654dddf354c3a1bba450f460
7
- data.tar.gz: 4e8f142e1485748418328682ea59f1fc1d2518296a49d86504f03fc4f5ec4929f97153e921b6caf0c4c14f3763848376e7963196d7dfa5199f73837a73ab0e59
6
+ metadata.gz: 71f343c18aca06719fbb0af9f37e7ca562324ee94f3676de66205db49ccfcc24ae7aa020e6fc8dd44f280c0726bc691fb9982258b244e8c5b17e6d8728a25d77
7
+ data.tar.gz: 1fcbf2264ffe40e7bf482e25cb5f71cc70633832135369ff9658d598cec76a33cd744457b525e3806feecf46fa877be83a2d54559e5d7a1e2aa245766f8546b6
@@ -1,13 +1,26 @@
1
1
  module LetterAvatar
2
2
  module HasAvatar
3
- extend ActiveSupport::Concern
3
+ def self.included(base)
4
+ base.send :include, InstanceMethods
5
+ base.extend ClassMethods
6
+ end
4
7
 
5
- def avatar_path(size = 200)
6
- LetterAvatar.generate(name, size)
8
+ module ClassMethods
7
9
  end
8
10
 
9
- def avatar_url(size = 200)
10
- avatar_path(size).gsub(/public/, '')
11
+ module InstanceMethods
12
+ def self.included(base)
13
+ base.extend ClassMethods
14
+ end
15
+
16
+ def avatar_path(size = 200)
17
+ LetterAvatar.generate(name, size)
18
+ end
19
+
20
+ def avatar_url(size = 200)
21
+ avatar_path(size).gsub(/public/, '')
22
+ end
23
+
11
24
  end
12
25
  end
13
26
  end
@@ -1,3 +1,3 @@
1
1
  module LetterAvatar
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Discourse Developers
@@ -12,21 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
  date: 2016-05-30 00:00:00.000000000 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: activesupport
18
- requirement: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 3.0.0
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 3.0.0
15
+ dependencies: []
30
16
  description: Gem for creating letter avatar from user's name
31
17
  email:
32
18
  - kszczuka@gmail.com