jekyll-twemoji 1.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/twemoji.rb +3 -21
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8763bd14be16500db409d1d404099c5e27a83ff1
|
4
|
+
data.tar.gz: 22cf1eefff256a76ea3dbc3ab09f156f95a5d2e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d33fdb3a2b749578d126b3dd3238ae68a8b4059a194b4e093bc681c50835610f6a9bb6bb5df926ce9f9510cb7f6538cfd126b72233ced511bd6b9b1e6a6b7f5
|
7
|
+
data.tar.gz: fc134e19c3aa5448007fa7240b52fd9551db28ef7fa78e09d7ded013318d770d0d3365cd58ea14f57ffefb4f106f28d4e835431800291f5c845775e7f6cd8de8
|
data/lib/jekyll/twemoji.rb
CHANGED
@@ -8,7 +8,6 @@ module Jekyll
|
|
8
8
|
|
9
9
|
JEKYLL_CONFIG_NAMESPACE = "jekyll-twemoji".freeze
|
10
10
|
VALID_IMAGE_TYPES = %w(png svg).freeze
|
11
|
-
VALID_IMAGE_SIZES = %w(16x16 32x32 72x72).freeze
|
12
11
|
|
13
12
|
def initialize(config = {})
|
14
13
|
@config = config
|
@@ -19,16 +18,7 @@ module Jekyll
|
|
19
18
|
if config_inquiry? "image_type"
|
20
19
|
validates_image_type(config["jekyll-twemoji"]["image_type"])
|
21
20
|
else
|
22
|
-
"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def image_size
|
27
|
-
@image_size ||=
|
28
|
-
if config_inquiry? "image_size"
|
29
|
-
validates_image_sizes(config["jekyll-twemoji"]["image_size"])
|
30
|
-
else
|
31
|
-
"16x16"
|
21
|
+
"svg"
|
32
22
|
end
|
33
23
|
end
|
34
24
|
|
@@ -40,7 +30,7 @@ module Jekyll
|
|
40
30
|
|
41
31
|
def emojify(page)
|
42
32
|
page.content =
|
43
|
-
::Twemoji.parse(page.content, file_ext: image_type
|
33
|
+
::Twemoji.parse(page.content, file_ext: image_type)
|
44
34
|
end
|
45
35
|
|
46
36
|
def jekyll_v3?
|
@@ -60,18 +50,10 @@ module Jekyll
|
|
60
50
|
end
|
61
51
|
|
62
52
|
if VALID_IMAGE_TYPES.include? image_type
|
63
|
-
|
53
|
+
image_type
|
64
54
|
else
|
65
55
|
fail "Image type not supported: #{image_type}. Supported image types are: #{VALID_IMAGE_TYPES.join(", ")}."
|
66
56
|
end
|
67
57
|
end
|
68
|
-
|
69
|
-
def validates_image_sizes(image_size)
|
70
|
-
if VALID_IMAGE_SIZES.include? image_size
|
71
|
-
image_size
|
72
|
-
else
|
73
|
-
fail "Image size not supported: #{image_size}. Supported image sizes are: #{VALID_IMAGE_SIZES.join(", ")}."
|
74
|
-
end
|
75
|
-
end
|
76
58
|
end
|
77
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-twemoji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juanito Fatas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '3.0'
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- katehuang0320@gmail.com
|
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
68
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.4
|
69
|
+
rubygems_version: 2.6.4
|
70
70
|
signing_key:
|
71
71
|
specification_version: 4
|
72
72
|
summary: Twemoji plugin for Jekyll in Pure Ruby.
|