twemoji 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +9 -3
- data/lib/twemoji.rb +3 -2
- data/lib/twemoji/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: 8ceb65c62354fc03e8bffd634cebe6a3f7a777c0
|
|
4
|
+
data.tar.gz: 63dafc2f70816105d2504fb21c48f0e71e743765
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 609d5e864ff80f95e6ec7e7c6ee8ef56d34a5d16599b9b81f5d7314227e7ad64f8e980bbfa0f1d5f2c50f01db8e8feb3c32c20670653b43f6f5579cb774d0405
|
|
7
|
+
data.tar.gz: 2850a1b92d539355795f129928d5a9e04e25c5a6f2d9b03476164ac1ef587bc83f6180c469bdbb3069cfca7721d9148af14eb5fa5febabdfa91a8eb20f52cf13
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 3.0.1 - 2016.06.28
|
|
6
|
+
|
|
7
|
+
- Fix `img` tag `alt` attribute render incorrectly [#29](https://github.com/jollygoodcode/twemoji/pull/29)
|
|
8
|
+
|
|
5
9
|
## 3.0.0 - 2016.06.08
|
|
6
10
|
|
|
7
11
|
### Features
|
|
@@ -37,6 +41,10 @@
|
|
|
37
41
|
- PNG now only has one size `72x72`
|
|
38
42
|
- Remove `Twemoji.to_json` method
|
|
39
43
|
|
|
44
|
+
### Bug fixes
|
|
45
|
+
|
|
46
|
+
- Fix `find_by_unicode` that only can find by single unicode [051f5a5](https://github.com/jollygoodcode/twemoji/commit/051f5a57c40f24d8d5caa65b462a9bee01545412)
|
|
47
|
+
|
|
40
48
|
## 2.2.1 - 2016.06.07
|
|
41
49
|
|
|
42
50
|
- Lose released Gem weight [#26](https://github.com/jollygoodcode/twemoji/pull/26)
|
data/README.md
CHANGED
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
Twitter [opensourced Twitter Emoji](http://twitter.github.io/twemoji/) and the official JavaScript implementation is available at [twemoji](https://github.com/twitter/twemoji).
|
|
12
12
|
|
|
13
|
-
This RubyGem `twemoji` is a minimum implementation of Twitter Emoji in Ruby so that you can
|
|
13
|
+
This RubyGem `twemoji` is a minimum implementation of Twitter Emoji in Ruby so that you can use emoji in your Ruby/Rails apps too!
|
|
14
14
|
|
|
15
15
|
__Note:__ This gem might not implement all the features available in the JavaScript implementation.
|
|
16
16
|
|
|
17
17
|
## Twemoji Gem and twemoji.js versions
|
|
18
18
|
|
|
19
|
-
- Twemoji Gem 3.x supports twemoji.js V2 (1661 emojis)
|
|
20
|
-
- Twemoji Gem 2.x supports twemoji.js V1 (874 emojis)
|
|
19
|
+
- Twemoji Gem 3.x supports twemoji.js V2 (1661 emojis) [Preview](https://jollygoodcode.github.io/twemoji/)
|
|
20
|
+
- Twemoji Gem 2.x supports twemoji.js V1 (874 emojis) [Preview](http://jollygoodcode.github.io/twemoji/v1/)
|
|
21
|
+
|
|
22
|
+
*Preview pages' Images is CC-BY 4.0 by [Twitter/Twemoji](https://github.com/twitter/twemoji).*
|
|
21
23
|
|
|
22
24
|
## Installation
|
|
23
25
|
|
|
@@ -39,6 +41,10 @@ Or install it yourself as:
|
|
|
39
41
|
|
|
40
42
|
- [Integration with `HTML::Pipeline`](https://github.com/jollygoodcode/twemoji/wiki/Integrate-with-HTML%3A%3APipeline)
|
|
41
43
|
|
|
44
|
+
## Twemoji and Rails
|
|
45
|
+
|
|
46
|
+
- [Checkout this tutorial: Twemoji in Rails](https://github.com/jollygoodcode/jollygoodcode.github.io/issues/18)
|
|
47
|
+
|
|
42
48
|
## Rails Helper
|
|
43
49
|
|
|
44
50
|
`$ touch app/helpers/emoji_helper.rb`
|
data/lib/twemoji.rb
CHANGED
|
@@ -84,8 +84,9 @@ module Twemoji
|
|
|
84
84
|
# @param text_or_code [String] Emoji text or code to render as unicode.
|
|
85
85
|
# @return [String] Emoji UTF-8 Text.
|
|
86
86
|
def self.render_unicode(text_or_code)
|
|
87
|
-
text_or_code = find_by_text(text_or_code) if text_or_code[0] ==
|
|
88
|
-
|
|
87
|
+
text_or_code = find_by_text(text_or_code) if text_or_code[0] == ?:
|
|
88
|
+
unicodes = text_or_code.split(?-)
|
|
89
|
+
unicodes.map(&:hex).pack(?U*unicodes.size)
|
|
89
90
|
end
|
|
90
91
|
|
|
91
92
|
# Parse string, replace emoji text with image.
|
data/lib/twemoji/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twemoji
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juanito
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-06-
|
|
12
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|
|
@@ -73,3 +73,4 @@ signing_key:
|
|
|
73
73
|
specification_version: 4
|
|
74
74
|
summary: 'A RubyGem to convert :heart: to Twitter cdn url'
|
|
75
75
|
test_files: []
|
|
76
|
+
has_rdoc:
|