gemojione 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/index.json +1 -1
- data/lib/gemojione.rb +1 -1
- data/lib/gemojione/version.rb +1 -1
- data/test/gemojione_test.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 455f38287af794c7c5a4dfb785b1d7ee443bf44580c240e31c53846f765c2f4a
|
4
|
+
data.tar.gz: c93fc4969e4bdb26439699dd5ec4a88e6e23638e9525588c93ed6e2294c11b76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1872d0d8df55a803ff8d1043b38ac561a55e4ffb40a152c489719903b24faf972b08fa3c339a50e02da6e221440efa69f962ec967fc6618f977ff3f78875503e
|
7
|
+
data.tar.gz: 2eacb7cc9b7a39f70506d45192c2ecf7697d5bac75c0e38384f54baa214418813ef10aa8ba1aa24b4ea643b49187f9330ed58e16d1444ece1c22982b456c5b62
|
data/config/index.json
CHANGED
@@ -20981,7 +20981,7 @@
|
|
20981
20981
|
|
20982
20982
|
],
|
20983
20983
|
"keywords": [
|
20984
|
-
"
|
20984
|
+
"accommodation",
|
20985
20985
|
"building",
|
20986
20986
|
"checkin",
|
20987
20987
|
"whotel",
|
data/lib/gemojione.rb
CHANGED
@@ -75,7 +75,7 @@ module Gemojione
|
|
75
75
|
def self.image_tag_for_moji(moji)
|
76
76
|
if use_sprite
|
77
77
|
emoji = index.find_by_moji(moji)
|
78
|
-
%Q{<span class="emojione emojione-#{emoji['unicode'].to_s.downcase}" alt="#{
|
78
|
+
%Q{<span class="emojione emojione-#{emoji['unicode'].to_s.downcase}" alt="#{ emoji['name'] }" title="#{ emoji['shortname'] }">#{ moji }</span>}
|
79
79
|
else
|
80
80
|
%Q{<img alt="#{moji}" class="emoji" src="#{ image_url_for_unicode_moji(moji) }"#{ default_size ? ' style="width: '+default_size+';"' : '' }>}
|
81
81
|
end
|
data/lib/gemojione/version.rb
CHANGED
data/test/gemojione_test.rb
CHANGED
@@ -74,7 +74,7 @@ describe Gemojione do
|
|
74
74
|
|
75
75
|
it 'should generate spritesheet tag' do
|
76
76
|
with_emoji_config(:use_sprite, true) do
|
77
|
-
assert_equal "<span class=\"emojione emojione-1f300\" alt=\"
|
77
|
+
assert_equal "<span class=\"emojione emojione-1f300\" alt=\"cyclone\" title=\":cyclone:\">🌀</span>", Gemojione.image_tag_for_moji('🌀')
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|
@@ -99,7 +99,7 @@ describe Gemojione do
|
|
99
99
|
with_emoji_config(:use_sprite, true) do
|
100
100
|
base_string = "I ❤ Emoji"
|
101
101
|
replaced_string = Gemojione.replace_unicode_moji_with_images(base_string)
|
102
|
-
assert_equal "I <span class=\"emojione emojione-2764\" alt=\"
|
102
|
+
assert_equal "I <span class=\"emojione emojione-2764\" alt=\"heart\" title=\":heart:\">❤</span> Emoji", replaced_string
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
@@ -167,7 +167,7 @@ describe Gemojione do
|
|
167
167
|
with_emoji_config(:use_sprite, true) do
|
168
168
|
base_string = "I :heart: Emoji"
|
169
169
|
replaced_string = Gemojione.replace_named_moji_with_images(base_string)
|
170
|
-
assert_equal "I <span class=\"emojione emojione-2764\" alt=\"
|
170
|
+
assert_equal "I <span class=\"emojione emojione-2764\" alt=\"heart\" title=\":heart:\">❤</span> Emoji", replaced_string
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
@@ -266,7 +266,7 @@ describe Gemojione do
|
|
266
266
|
it 'should replace ascii moji with span tag for sprite' do
|
267
267
|
with_emoji_config(:use_sprite, true) do
|
268
268
|
replaced_string = Gemojione.replace_ascii_moji_with_images("Emoji is :-)")
|
269
|
-
assert_equal "Emoji is <span class=\"emojione emojione-1f604\" alt=\"
|
269
|
+
assert_equal "Emoji is <span class=\"emojione emojione-1f604\" alt=\"smile\" title=\":smile:\">😄</span>", replaced_string
|
270
270
|
end
|
271
271
|
end
|
272
272
|
end
|