jekyll-twemoji 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/twemoji.rb +7 -3
  3. metadata +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10ed12f29388c0043be6272fc94000d00b92546c
4
- data.tar.gz: e120ef2481e5059974b78d0986d718888c2a0693
3
+ metadata.gz: c2aeb2327a8ae10b5b77aba4432171c131870d89
4
+ data.tar.gz: acf96c375730c616bf17181db059ec6d94d90e1a
5
5
  SHA512:
6
- metadata.gz: 3f4ad0019fc0542bdb4549170fe532a1dbad16b0c9c4f3d49dadbfa2501778a0c05ed056b03da35417105067f9f8c9e8ff651fa9f1783a777ddd9083eb131ecf
7
- data.tar.gz: a31b3b43e6e35d380aa34eb3c82fed3bdee5343ce128a73f07f9cba4a9aa343f2997e46122565f6512c152332d85f78885a9a872e39511fb97ba6903b594c814
6
+ metadata.gz: e62d09055bac7c7754202ec35ffaa1744de60e108efbace81aa56b8b06fc37c8ba339b04c9c4c122e8e108a8808b6dadbc2cb1d540481e4333f6c145fa0d22ca
7
+ data.tar.gz: e25e784f04a1f6b27aa866d74b8c03a42417e86fe88903f2b3423dc22af65325a593769bb39d1b27e37d65efae6d9299b450a4c90ac3dbd7ac388fd1ca5258db
@@ -17,7 +17,7 @@ module Jekyll
17
17
  def image_type
18
18
  @image_type ||=
19
19
  if config_inquiry? "image_type"
20
- validates_image_type(config["jekyll-twemoji"]["image_type"])
20
+ validates_image_type(config["jekyll-twemoji"]["image_type"])
21
21
  else
22
22
  ".svg"
23
23
  end
@@ -26,15 +26,15 @@ module Jekyll
26
26
  def image_size
27
27
  @image_size ||=
28
28
  if config_inquiry? "image_size"
29
- validates_image_sizes(config["jekyll-twemoji"]["image_size"])
29
+ validates_image_sizes(config["jekyll-twemoji"]["image_size"])
30
30
  else
31
31
  "16x16"
32
32
  end
33
33
  end
34
34
 
35
35
  def generate(site)
36
+ site.posts.each { |post| emojify post } unless jekyll_v3?
36
37
  site.pages.each { |page| emojify page }
37
- site.posts.each { |post| emojify post }
38
38
  site.docs_to_write.each { |doc| emojify doc }
39
39
  end
40
40
 
@@ -43,6 +43,10 @@ module Jekyll
43
43
  ::Twemoji.parse(page.content, file_ext: image_type, image_size: image_size)
44
44
  end
45
45
 
46
+ def jekyll_v3?
47
+ ::Jekyll::VERSION.to_f >= 3.0
48
+ end
49
+
46
50
  private
47
51
 
48
52
  def config_inquiry?(key)
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-twemoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2015-04-19 00:00:00.000000000 Z
11
+ date: 2015-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
@@ -66,8 +66,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  requirements: []
68
68
  rubyforge_project:
69
- rubygems_version: 2.4.5
69
+ rubygems_version: 2.4.8
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: Twemoji plugin for Jekyll in Pure Ruby.
73
73
  test_files: []
74
+ has_rdoc: