twemoji 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca77ba3081ece95f9a99dd12cea08feb0d46dd52
4
- data.tar.gz: f9062643a1cd0b4c95ecc7a7049f15c940b3de18
3
+ metadata.gz: 8ceb65c62354fc03e8bffd634cebe6a3f7a777c0
4
+ data.tar.gz: 63dafc2f70816105d2504fb21c48f0e71e743765
5
5
  SHA512:
6
- metadata.gz: a7ee8617d645cae1cc5af9e2a7e623c3acd2e770e6162ddcb82c91fa7f38da08831aeab500441d6960a9751d3a90e72ea61b90a02705e6057b2d4335d7e20b17
7
- data.tar.gz: fbc093472b082ba45a89fc3cd6fc9a5562c4ece473ed4fb74b6ff1ff0bce21d77dbffb7597ce54e2ebf0e30fff77f50927bc502fb4094b968bf57b5b934cbcae
6
+ metadata.gz: 609d5e864ff80f95e6ec7e7c6ee8ef56d34a5d16599b9b81f5d7314227e7ad64f8e980bbfa0f1d5f2c50f01db8e8feb3c32c20670653b43f6f5579cb774d0405
7
+ data.tar.gz: 2850a1b92d539355795f129928d5a9e04e25c5a6f2d9b03476164ac1ef587bc83f6180c469bdbb3069cfca7721d9148af14eb5fa5febabdfa91a8eb20f52cf13
@@ -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 haz emoji in your Ruby/Rails apps too!
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`
@@ -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
- [text_or_code.hex].pack("U")
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Twemoji
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
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.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-08 00:00:00.000000000 Z
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: