jekyll_emoji_tag 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +29 -19
- data/CHANGELOG.md +19 -0
- data/README.md +19 -2
- data/Rakefile +0 -0
- data/jekyll_emoji_tag.gemspec +4 -3
- data/lib/emoji.rb +14 -9
- data/lib/jekyll_emoji_tag/version.rb +1 -1
- data/lib/jekyll_emoji_tag.rb +0 -0
- data/spec/jekyll_emoji_tag/emoji_spec.rb +0 -0
- data/spec/spec_helper.rb +0 -0
- metadata +5 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9eff8c7ae7a42a8a2c44213ed53d3956913bc12456409ee78a59d0b7ed6bc9a
|
4
|
+
data.tar.gz: cfa18b18f3cb225e01f7ad3b32d6b4802a3d353f7041e7f66a82829d322efb67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3212297ad9c2de5fbb027e9b0bf62d461755633dbff5126570eb8508204c85f3fb7983eda12c72e4a3af57b2c1f85f47d0e8696c1fa6ca459503610b0de63b2c
|
7
|
+
data.tar.gz: 73f000f1d95fc051085d4d3f405290e1f06b5d5d9dd05205a47a9a10487e6b790b27e04cdbff47eba7e6f1b2bd849c3c195c7c8be6775a47f11b7c7d3411f6fa
|
data/.rubocop.yml
CHANGED
@@ -8,7 +8,7 @@ require:
|
|
8
8
|
AllCops:
|
9
9
|
Exclude:
|
10
10
|
- binstub/**/*
|
11
|
-
-
|
11
|
+
- demo/_site/*
|
12
12
|
- vendor/**/*
|
13
13
|
- Gemfile*
|
14
14
|
NewCops: enable
|
@@ -30,28 +30,45 @@ Layout/LineLength:
|
|
30
30
|
Max: 150
|
31
31
|
|
32
32
|
Metrics/AbcSize:
|
33
|
-
Max:
|
33
|
+
Max: 55
|
34
34
|
|
35
35
|
Metrics/BlockLength:
|
36
36
|
Exclude:
|
37
|
-
-
|
37
|
+
- jekyll_plugin_support.gemspec
|
38
38
|
Max: 30
|
39
39
|
|
40
40
|
Metrics/CyclomaticComplexity:
|
41
|
-
Max:
|
41
|
+
Max: 25
|
42
42
|
|
43
43
|
Metrics/MethodLength:
|
44
|
-
Max:
|
45
|
-
|
46
|
-
Metrics/ModuleLength:
|
47
|
-
Enabled: false
|
44
|
+
Max: 50
|
48
45
|
|
49
46
|
Metrics/PerceivedComplexity:
|
50
|
-
Max:
|
47
|
+
Max: 25
|
51
48
|
|
52
49
|
Naming/FileName:
|
53
50
|
Exclude:
|
54
51
|
- Rakefile
|
52
|
+
- "*.md"
|
53
|
+
|
54
|
+
RSpec/ExampleLength:
|
55
|
+
Max: 30
|
56
|
+
|
57
|
+
RSpec/SpecFilePathFormat:
|
58
|
+
Enabled: false
|
59
|
+
IgnoreMethods: true
|
60
|
+
|
61
|
+
RSpec/SpecFilePathSuffix:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
RSpec/IndexedLet:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
RSpec/MultipleExpectations:
|
68
|
+
Max: 15
|
69
|
+
|
70
|
+
Style/ClassVars:
|
71
|
+
Enabled: false
|
55
72
|
|
56
73
|
Style/Documentation:
|
57
74
|
Enabled: false
|
@@ -59,15 +76,8 @@ Style/Documentation:
|
|
59
76
|
Style/FrozenStringLiteralComment:
|
60
77
|
Enabled: false
|
61
78
|
|
79
|
+
Style/StringConcatenation:
|
80
|
+
Enabled: false
|
81
|
+
|
62
82
|
Style/TrailingCommaInHashLiteral:
|
63
83
|
EnforcedStyleForMultiline: comma
|
64
|
-
|
65
|
-
RSpec/FilePath:
|
66
|
-
IgnoreMethods: true
|
67
|
-
SpecSuffixOnly: true
|
68
|
-
|
69
|
-
RSpec/ExampleLength:
|
70
|
-
Max: 30
|
71
|
-
|
72
|
-
RSpec/MultipleExpectations:
|
73
|
-
Max: 15
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.1.4 / 2024-12-21
|
4
|
+
|
5
|
+
* Added the `emoji` class to the emitted span or div.
|
6
|
+
* The demo webapp now includes a stylesheet: `/assets/css/jekyll_emoji`.
|
7
|
+
* Previous versions defaulted to `font-size: 3em;`.
|
8
|
+
If you want the default font size to remain as it was for previous version of this Jekyll tag,
|
9
|
+
define the emoji class as:
|
10
|
+
|
11
|
+
```css
|
12
|
+
.emoji {
|
13
|
+
font-size: 3em;
|
14
|
+
}
|
15
|
+
```
|
16
|
+
|
17
|
+
## 0.1.3 / 2024-07-24
|
18
|
+
|
19
|
+
* Make compatible with `jekyll_plugin_support` v1.0.0
|
20
|
+
|
21
|
+
|
3
22
|
## 0.1.2 / 2024-01-28
|
4
23
|
|
5
24
|
* Added `clap` (hands), `confounded`, `eggplant`, `grimace`, `halo`, `loudly_crying`,
|
data/README.md
CHANGED
@@ -31,8 +31,8 @@ $ bundle
|
|
31
31
|
`OPTIONS` are:
|
32
32
|
|
33
33
|
- `align` - `left`, `right` or `inline` (default is inline)
|
34
|
-
- `class` - CSS
|
35
|
-
- `div` - Wrap the emoji in a
|
34
|
+
- `class` - CSS class to apply to the generated emoji
|
35
|
+
- `div` - Wrap the emoji in a <div/> instead of a <span/>
|
36
36
|
- `emoji_and_name` - causes the name of the emoji to be output along with the image (default is false)
|
37
37
|
- `list` - output all emojis (default is false)
|
38
38
|
- `name` - name of emoji (defaults to smiley)
|
@@ -48,16 +48,33 @@ The names of all supported emojis are:
|
|
48
48
|
```text
|
49
49
|
angry
|
50
50
|
boom
|
51
|
+
clap
|
52
|
+
confounded
|
53
|
+
eggplant
|
54
|
+
grimace
|
51
55
|
grin
|
56
|
+
halo
|
52
57
|
horns
|
53
58
|
kiss
|
59
|
+
loudly_cry
|
60
|
+
notes
|
54
61
|
open
|
62
|
+
please
|
55
63
|
poop
|
64
|
+
rolling
|
56
65
|
sad
|
66
|
+
sax
|
57
67
|
scream
|
58
68
|
smiley
|
59
69
|
smirk
|
70
|
+
sunglasses
|
71
|
+
think
|
60
72
|
two_hearts
|
73
|
+
wink
|
74
|
+
worried
|
75
|
+
unamused
|
76
|
+
vulcan
|
77
|
+
zipper
|
61
78
|
```
|
62
79
|
|
63
80
|
## Example Usage
|
data/Rakefile
CHANGED
File without changes
|
data/jekyll_emoji_tag.gemspec
CHANGED
@@ -18,8 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
'homepage_uri' => spec.homepage,
|
19
19
|
'source_code_uri' => host,
|
20
20
|
}
|
21
|
-
spec.name
|
22
|
-
spec.
|
21
|
+
spec.name = 'jekyll_emoji_tag'
|
22
|
+
spec.platform = Gem::Platform::RUBY
|
23
|
+
spec.post_install_message = <<~END_MESSAGE
|
23
24
|
|
24
25
|
Thanks for installing #{spec.name}!
|
25
26
|
|
@@ -30,5 +31,5 @@ Gem::Specification.new do |spec|
|
|
30
31
|
spec.version = JekyllEmojiTag::VERSION
|
31
32
|
|
32
33
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
33
|
-
spec.add_dependency 'jekyll_plugin_support', '>= 0.
|
34
|
+
spec.add_dependency 'jekyll_plugin_support', '>= 1.0.0'
|
34
35
|
end
|
data/lib/emoji.rb
CHANGED
@@ -20,7 +20,7 @@ require_relative 'jekyll_emoji_tag/version'
|
|
20
20
|
# MyTag: debug
|
21
21
|
module JekyllEmojiTag
|
22
22
|
# This class implements the Jekyll emoji functionality
|
23
|
-
class Emoji < JekyllSupport::JekyllTag
|
23
|
+
class Emoji < ::JekyllSupport::JekyllTag
|
24
24
|
PLUGIN_NAME = 'emoji'.freeze
|
25
25
|
VERSION = JekyllEmojiTag::VERSION
|
26
26
|
|
@@ -67,14 +67,18 @@ module JekyllEmojiTag
|
|
67
67
|
# @param tokens [Liquid::ParseContext] tokenized command line
|
68
68
|
# @return [void]
|
69
69
|
def render_impl
|
70
|
-
@klass = @helper.parameter_specified? 'class'
|
71
|
-
@tag = @helper.parameter_specified?('div') ? 'div' : 'span'
|
72
|
-
@style = @helper.parameter_specified? 'style'
|
73
|
-
@emoji_name = @helper.parameter_specified?('name') || 'smiley' # Ignored if `list` is specified
|
74
70
|
@emoji_align = @helper.parameter_specified?('align') || 'inline' # Allowable values are: inline, right or left
|
75
|
-
|
71
|
+
|
72
|
+
emoji_size = @helper.parameter_specified?('size')
|
73
|
+
@emoji_size = "font-size: #{emoji_size}; " if emoji_size
|
74
|
+
|
75
|
+
@emoji_name = @helper.parameter_specified?('name') || 'smiley' # Ignored if `list` is specified
|
76
76
|
@emoji_and_name = @helper.parameter_specified? 'emoji_and_name'
|
77
|
+
@klass = @helper.parameter_specified? 'class'
|
77
78
|
@list = @helper.parameter_specified? 'list'
|
79
|
+
@style = @helper.parameter_specified? 'style'
|
80
|
+
@tag = @helper.parameter_specified?('div') ? 'div' : 'span'
|
81
|
+
|
78
82
|
@emoji_hex_code = Emoji.emojis[@emoji_name] if @emoji_name || Emoji.emojis['boom']
|
79
83
|
|
80
84
|
# variables defined in pages are stored as hash values in liquid_context
|
@@ -118,9 +122,10 @@ module JekyllEmojiTag
|
|
118
122
|
end
|
119
123
|
|
120
124
|
name = " <code>#{emoji_name}</code>" if @emoji_and_name
|
121
|
-
klass = @klass ? " class='#{@klass}'" : ''
|
125
|
+
klass = @klass ? " class='emoji #{@klass}'" : " class='emoji'"
|
126
|
+
style = "#{@emoji_size}#{align};#{@style}".strip.gsub ';;', ';'
|
122
127
|
|
123
|
-
"<#{@tag}#{klass} style='
|
128
|
+
"<#{@tag}#{klass} style='#{style}'>#{emoji_hex_code}</#{@tag}>#{name}"
|
124
129
|
end
|
125
130
|
|
126
131
|
def list
|
@@ -134,6 +139,6 @@ module JekyllEmojiTag
|
|
134
139
|
END_RESULT
|
135
140
|
end
|
136
141
|
|
137
|
-
JekyllPluginHelper.register(self, PLUGIN_NAME)
|
142
|
+
::JekyllSupport::JekyllPluginHelper.register(self, PLUGIN_NAME)
|
138
143
|
end
|
139
144
|
end
|
data/lib/jekyll_emoji_tag.rb
CHANGED
File without changes
|
File without changes
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_emoji_tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-
|
10
|
+
date: 2024-12-21 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: jekyll
|
@@ -30,14 +29,14 @@ dependencies:
|
|
30
29
|
requirements:
|
31
30
|
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
32
|
+
version: 1.0.0
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - ">="
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
39
|
+
version: 1.0.0
|
41
40
|
description: 'Inserts an emoji
|
42
41
|
|
43
42
|
'
|
@@ -84,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
83
|
- !ruby/object:Gem::Version
|
85
84
|
version: '0'
|
86
85
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
88
|
-
signing_key:
|
86
|
+
rubygems_version: 3.6.0
|
89
87
|
specification_version: 4
|
90
88
|
summary: Inserts an emoji
|
91
89
|
test_files: []
|