jekyll-avatar 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/lib/jekyll-avatar.rb +5 -4
- data/lib/jekyll-avatar/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2df65b0567ec7f5ace78586ba68a2212e370944d
|
4
|
+
data.tar.gz: a0ac164bc7bfc19d6c3ddc50f038944a7cf7f6f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60bd8737b13b66b6d80efeb8e572679a99f9f3e913ddad75f5d2c03cf368899141be33e45474d88c8e44d64ae6fc444d0b1e501c719a9c61129fac20eca7d00e
|
7
|
+
data.tar.gz: fe32c49f9a12b3fbaf4454dbb25a2cca4e5f59ffd4e9fdba58171b48f40cfd34c441c0e7b67ccb7227147234f98a11a19725748a95415a8e4447b00b174fb894
|
data/.rubocop.yml
CHANGED
data/lib/jekyll-avatar.rb
CHANGED
@@ -6,12 +6,14 @@ module Jekyll
|
|
6
6
|
DEFAULT_SIZE = 40
|
7
7
|
VERSION = 3
|
8
8
|
|
9
|
-
def initialize(
|
9
|
+
def initialize(_tag_name, text, _tokens)
|
10
10
|
super
|
11
11
|
@text = text
|
12
12
|
end
|
13
13
|
|
14
|
-
def render(
|
14
|
+
def render(context)
|
15
|
+
@text = Liquid::Template.parse(@text).render(context)
|
16
|
+
|
15
17
|
tag = '<img '
|
16
18
|
|
17
19
|
# See http://primercss.io/avatars/#small-avatars
|
@@ -22,8 +24,7 @@ module Jekyll
|
|
22
24
|
end
|
23
25
|
|
24
26
|
tag << "src=\"#{url}\" alt=\"#{username}\" "
|
25
|
-
tag << "width=\"#{size}\" height=\"#{size}\" "
|
26
|
-
tag << '/>'
|
27
|
+
tag << "width=\"#{size}\" height=\"#{size}\" />"
|
27
28
|
tag
|
28
29
|
end
|
29
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-avatar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -126,3 +126,4 @@ signing_key:
|
|
126
126
|
specification_version: 4
|
127
127
|
summary: A Jekyll plugin for rendering GitHub avatars
|
128
128
|
test_files: []
|
129
|
+
has_rdoc:
|