gemojione 3.0.1 → 3.1.0

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: 119c0364bd3ac8b8c1ce9e95f38785ee187f379d
4
- data.tar.gz: 41b66e09af3a0bf87e66ca6fe334f1d90e5f94b3
3
+ metadata.gz: 9e19e90ac9a29d68ee843586a9189c4388656afb
4
+ data.tar.gz: feb80d873cfcf57e00f0ac138f4b2370b11bd721
5
5
  SHA512:
6
- metadata.gz: ad70ff93928e104d534ce44c67684813a51f5bcb95dc47042034103e81beff5b84346795491b0ea75a0f6c4f9591fa38e42f34a2847df89b53c09f39bfe49a11
7
- data.tar.gz: 862b1af5bdc40e8880467c946b36c415e67f3b4fc0c0abf8023d78f8cf39664ab2a950bfecb651f3cbff24e82d35dff4a1566bf81a4f488cd89bab2d50f07539
6
+ metadata.gz: 8fb0e757942f82183af4d346bf6d3d9a96e1291e91bfea78e7848c540cd5320e49c244fdfff12e0229a381b284d1515fac131251fa3b534744d2ebdd05a2fed5
7
+ data.tar.gz: 727dc1f707e7db0cfd39349aadd46d1d7753a026a19138fddf96f24ff4eb05b73b4b69d57af3fa333112693f4dab85614dc5f916a3ae70bbea97836eae41e9a0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## [v3.1.0](https://github.com/jonathanwiesel/gemojione/tree/v3.0.1) (2016-07-30)
4
+
5
+ [Full Changelog](https://github.com/jonathanwiesel/gemojione/compare/v3.0.1...v3.1.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Add helper for named mojis as well [\#27](https://github.com/jonathanwiesel/gemojione/pull/27) ([gnclmorais](https://github.com/gnclmorais))
10
+ - Add find by keyword method [\#24](https://github.com/jonathanwiesel/gemojione/pull/24) ([jonathanwiesel](https://github.com/jonathanwiesel))
11
+ - Add gay\_pride\_flag [\#22](https://github.com/jonathanwiesel/gemojione/pull/22) ([jonathanwiesel](https://github.com/jonathanwiesel))
12
+ - Update mrs\_claus asset for glasses reflexion [\#28](https://github.com/jonathanwiesel/gemojione/issues/28)
13
+
14
+ **Fixed bugs:**
15
+
16
+ - Bring back `speech_left` definition that was wrongly removed.
17
+ - Remove duplicate ascii alias for `innocent` definition.
18
+
19
+
3
20
  ## [v3.0.1](https://github.com/jonathanwiesel/gemojione/tree/v3.0.1) (2016-07-16)
4
21
  [Full Changelog](https://github.com/jonathanwiesel/gemojione/compare/v3.0.0...v3.0.1)
5
22
 
@@ -74,6 +91,106 @@ config.assets.precompile << "emoji/*.svg"
74
91
 
75
92
  - The `install_assets` rake task now installs both asset types (PNGs and SVGs).
76
93
 
94
+ - The following definitions have been removed because they are not actually emoji:
95
+
96
+ ```
97
+ airplane_northeast
98
+ airplane_small_up
99
+ anger_left
100
+ ascending_notes
101
+ ballot_box_check
102
+ ballot_box_x
103
+ ballot_x
104
+ book2
105
+ bouquet2
106
+ boys_symbol
107
+ bullhorn
108
+ bullhorn_waves
109
+ calculator
110
+ cancellation_x
111
+ cartridge
112
+ celtic_cross
113
+ clockwise_arrows
114
+ computer_old
115
+ cross_heavy
116
+ cross_white
117
+ crossbones
118
+ descending_notes
119
+ desktop_window
120
+ document
121
+ document_text
122
+ envelope_back
123
+ envelope_flying
124
+ envelope_stamped
125
+ envelope_stamped_pen
126
+ finger_pointing_down
127
+ finger_pointing_down2
128
+ finger_pointing_left
129
+ finger_pointing_right
130
+ finger_pointing_up
131
+ fire_engine_oncoming
132
+ flip_phone
133
+ floppy_black
134
+ floppy_white
135
+ folder
136
+ folder_open
137
+ frame_tiles
138
+ frame_x
139
+ girls_symbol
140
+ hand_splayed_reverse
141
+ hand_victory
142
+ hard_disk
143
+ heart_tip
144
+ info
145
+ jet_up
146
+ keyboard_mouse
147
+ keyboard_with_jacks
148
+ keycap_ten
149
+ left_receiver
150
+ left_writing_hand
151
+ light_check_mark
152
+ lips2
153
+ mood_bubble
154
+ mood_bubble_lightning
155
+ mood_lightning
156
+ mouse_one
157
+ network
158
+ note
159
+ note_empty
160
+ notepad
161
+ notepad_empty
162
+ optical_disk
163
+ page
164
+ pages
165
+ pencil3
166
+ pennant_black
167
+ pennant_white
168
+ piracy
169
+ prohibited
170
+ pushpin_black
171
+ right_speaker
172
+ right_speaker_one
173
+ right_speaker_three
174
+ ringing_bell
175
+ rosette_black
176
+ speech_left
177
+ speech_right
178
+ speech_three
179
+ speech_two
180
+ stereo
181
+ stock_chart
182
+ telephone_black
183
+ telephone_white
184
+ thought_left
185
+ thought_right
186
+ thumbs_down_reverse
187
+ thumbs_up_reverse
188
+ train_diesel
189
+ triangle_round
190
+ turned_ok_hand
191
+ wired_keyboard
192
+ ```
193
+
77
194
  ## [v2.6.1](https://github.com/jonathanwiesel/gemojione/tree/v2.6.1) (2016-06-24)
78
195
  [Full Changelog](https://github.com/jonathanwiesel/gemojione/compare/v2.6.0...v2.6.1)
79
196
 
data/README.md CHANGED
@@ -66,6 +66,9 @@ Emoji Library Index APIs:
66
66
 
67
67
  > index.find_by_moji('❤')
68
68
  => {"moji"=>"❤", "unicode"=>"2764", "unicode_alternates"=>["2764-FE0F"], "name"=>"heart", "shortname"=>":heart:", "category"=>"symbols", "aliases"=>[], "aliases_ascii"=>["<3"], "keywords"=>["like", "love", "red", "pink", "black", "heart", "love", "passion", "romance", "intense", "desire", "death", "evil", "cold", "valentines"], "description"=>"heavy black heart"}
69
+
70
+ > index.find_by_keyword('teeth')
71
+ => [{"unicode"=>"1F62C", "unicode_alternates"=>[], "name"=>"grimacing", "shortname"=>":grimacing:", "category"=>"people", "aliases"=>[], "aliases_ascii"=>[], "keywords"=>["face", "grimace", "teeth", "disapprove", "pain", "silly", "smiley", "emotion", "selfie"], "moji"=>"😬", "description"=>"grimacing face"}, {"unicode"=>"1F479", "unicode_alternates"=>[], "name"=>"japanese_ogre", "shortname"=>":japanese_ogre:", "category"=>"people", "aliases"=>[], "aliases_ascii"=>[], "keywords"=>["monster", "japanese", "oni", "demon", "troll", "ogre", "folklore", "devil", "mask", "theater", "horns", "teeth"], "moji"=>"👹", "description"=>"japanese ogre"}]
69
72
  ```
70
73
  Default configuration integrates with Rails, but you can change it with an initializer:
71
74
 
@@ -101,6 +104,9 @@ and call methods directly on your string to return the same results:
101
104
  > 'I ❤ Emoji'.with_emoji_images
102
105
  => "I <img alt=\"❤\" class=\"emoji\" src=\"http://localhost:3000/assets/emoji/2764.png\"> Emoji"
103
106
 
107
+ > 'I :heart: Emoji'.with_emoji_names
108
+ => "I <img alt=\"❤\" class=\"emoji\" src=\"http://localhost:3000/assets/emoji/2764.png\"> Emoji"
109
+
104
110
  > 'heart'.image_url
105
111
  > '❤'.image_url
106
112
  => "http://localhost:3000/assets/emoji/2764.png"
@@ -121,6 +127,14 @@ To enable native HTML escaping, add this line to your application's Gemfile:
121
127
  ```ruby
122
128
  gem 'escape_utils'
123
129
  ```
130
+
131
+ ## Projects using the gem
132
+
133
+ * [Gitlab](https://github.com/gitlabhq/gitlabhq)
134
+ * [Gollum](https://github.com/gollum/gollum)
135
+
136
+ If your application uses the gem, open a PR and show your project's :heart: for the gem so it gets listed here.
137
+
124
138
  ## Contributors: :heart:
125
139
 
126
140
  This gem is a former fork of the [emoji](https://github.com/wpeterson/emoji) gem that has been adapted for EmojiOne.
@@ -130,6 +144,11 @@ This gem is a former fork of the [emoji](https://github.com/wpeterson/emoji) gem
130
144
  * [@parndt](https://github.com/parndt): README doc fixes
131
145
  * [@neuegram](https://github.com/neuegram): XSS Security Audit
132
146
  * [@jonathanwiesel](https://github.com/jonathanwiesel): Emojione support
147
+ * [@balasankarc](https://github.com/balasankarc): Asset executable bit cleaning.
148
+ * [@tsigo](https://github.com/tsigo): Ability to serve assets directly from the gem in a rails app.
149
+ * [@ZJvandeWeg](https://github.com/ZJvandeWeg): "Find by ASCII" feature.
150
+ * [@kendrikat](https://github.com/kendrikat): Railtie dependecy checker, default size option support and new `replace_named_moji_with_images` feature.
151
+ * [@gnclmorais](https://github.com/gnclmorais): Add `replace_named_moji_with_images ` missing ext helper.
133
152
 
134
153
  ## Contributing
135
154
 
Binary file
Binary file
data/assets/png/1F936.png CHANGED
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><path fill="#ed4c5c" d="m52.382 5.075c-12.245-1.872-28.245 22.961-43.169 15.422-.582-1.575-1.143-3.158-1.725-4.73 17.589 3.338 25.582-18.762 43.17-15.422.584 1.572 1.14 3.156 1.724 4.73"/><path fill="#ff8736" d="m54.105 9.804c-10.343-2.018-31.593 21.649-43.167 15.423-.585-1.573-1.14-3.157-1.725-4.73 17.589 3.338 25.581-18.763 43.169-15.422.584 1.572 1.14 3.156 1.723 4.729"/><path fill="#ffce31" d="m55.83 14.535c-10.068-1.791-28.744 23.715-43.168 15.422-.585-1.573-1.142-3.157-1.725-4.73 17.588 3.339 25.583-18.76 43.168-15.422.585 1.574 1.142 3.157 1.725 4.73"/><path fill="#83bf4f" d="m57.556 19.265c-9.711-1.521-31.086 25.813-43.171 15.422-.584-1.572-1.139-3.157-1.723-4.73 17.585 3.341 25.579-18.762 43.168-15.422.583 1.573 1.142 3.156 1.726 4.73"/><path fill="#275fd9" d="m59.278 23.995c-11.058-1.834-30.683 26.458-43.169 15.423-.584-1.574-1.144-3.156-1.725-4.73 17.588 3.338 25.582-18.761 43.171-15.422.583 1.573 1.141 3.155 1.723 4.729"/><path fill="#9028e0" d="m61 28.726c-17.583-3.34-25.579 18.761-43.166 15.421-.584-1.572-1.142-3.156-1.725-4.729 17.588 3.338 25.581-18.762 43.169-15.423.583 1.575 1.142 3.158 1.722 4.731"/><g fill="#3e4347"><circle cx="5.168" cy="13.336" r="2.168"/><path d="m7.04 14.49l-2.56.929 17.706 48.581h2.896z"/><path transform="matrix(.9399-.3414.3414.9399-4.8923 2.941)" d="m3.742 14.83h4.337v1.082h-4.337z"/></g></svg>
@@ -0,0 +1,2 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><path d="M8.6,5h46.9c3.6,0,6.6,2.9,6.6,6.5v29.8c0,3.6-2.9,6.5-6.6,6.5h-6.9V59L38.1,47.8H8.6c-3.6,0-6.6-2.9-6.6-6.5
2
+ V11.5C2,7.9,4.9,5,8.6,5z" fill="#4fd1d9"/><g fill="#fff"><circle cx="48" cy="26.4" r="4.2"/><circle cx="32" cy="26.4" r="4.2"/><circle cx="16" cy="26.4" r="4.2"/></g></svg>
data/assets/svg/1F936.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><ellipse cx="31.9" cy="13" rx="19.8" ry="11" fill="#d93d3d"/><ellipse cx="31.9" cy="16.8" rx="24.1" ry="11" fill="#e2e9ed"/><path d="m61.9 62h-60c0-11.8 13.4-12.9 30-12.9 16.6 0 30 1.1 30 12.9" fill="#ff4848"/><path d="m51.7 50.7c0 1.4-3.7 1.4-4.9 2.5-.9.9-.1 4.6-1.5 5.3-1.2.6-3.8-2.3-5.3-1.9-1.3.3-2.1 4.1-3.6 4.3-1.4.2-3-3.3-4.5-3.3-1.5 0-3.1 3.5-4.5 3.3-1.5-.2-2.3-4-3.6-4.3-1.5-.4-4.1 2.5-5.3 1.9-1.5-.7-.6-4.4-1.5-5.3-1.2-1.1-4.9-1.1-4.9-2.5 0-1.4 39.6-1.4 39.6 0" fill="#fff"/><path d="m54.4 25.9c-13.9-13.9-31.2-13.9-45.1 0l.1 15.4c0 6.7 6.6 14 22.9 14 15.4 0 22.1-6 22.1-14v-15.4" fill="#ffdd67"/><path d="m38.3 46.2c.1.1.2.3.2.5 0 1.5-3 3.3-6.7 3.3s-6.7-1.8-6.7-3.3c0-.2.1-.4.2-.6 0 0 2.9 1.3 6.5 1.3 3.7.1 6.5-1.2 6.5-1.2" fill="#454749"/><path d="m31.9 8.3c-27 0-31.7 21.2-22.4 28.5 0 0 4.6-7.8 14.3-11.6 3.2-1.2 5.9-2.4 8.1-3.6 2.2 1.1 4.9 2.3 8.1 3.6 9.7 3.7 14.4 11.6 14.4 11.6 9.2-7.3 4.5-28.5-22.5-28.5" fill="#8b9fa5"/><g fill="#454749"><path d="m41.5 48.6c-.5 0-1-.1-1.5-.3-.5-.2-.9-.5-1.3-.8-.8-.6-1.4-1.6-1.4-2.6.7.7 1.3 1.3 2 1.9.8.6 1.5 1.1 2.2 1.8"/><path d="m22.2 48.6c.8-.7 1.5-1.2 2.2-1.8.7-.6 1.3-1.2 2-1.9 0 1-.7 1.9-1.4 2.6-.4.3-.8.6-1.3.8-.5.1-1 .3-1.5.3"/><path d="m19.2 36.7l-.3-2.7c.7-.1 1.7-.3 2.8-.5 5.2-1 14-2.7 23.4.5l-.9 2.5c-8.8-3-17.1-1.4-22.1-.4-1 .3-2.1.5-2.9.6"/><ellipse cx="21" cy="35.4" rx="8" ry="8"/></g><g fill="#b4d7ee"><path d="m15.4 35.4c0 .9.2 1.8.7 2.6l3-7.9c-2.1.8-3.7 2.9-3.7 5.3"/><path d="m21.8 40.9c2.7-.4 4.8-2.7 4.8-5.5 0-1.3-.5-2.5-1.2-3.5l-3.6 9"/><path d="m22.4 30l-4 10.3c.6.3 1.2.5 1.9.6l3.9-10c-.5-.4-1.1-.7-1.8-.9"/></g><g fill="#fff"><path d="m21 29.9c-.7 0-1.3.1-1.9.3l-3 7.9c.5 1 1.4 1.8 2.4 2.3l4-10.3c-.5-.2-1-.2-1.5-.2"/><path d="m24.3 31l-3.9 10c.2 0 .4 0 .6 0 .3 0 .5 0 .8-.1l3.5-9c-.3-.3-.6-.7-1-.9"/></g><ellipse cx="42.8" cy="35.4" rx="8" ry="8" fill="#454749"/><g fill="#b4d7ee"><path d="m37.3 35.4c0 1 .3 1.9.7 2.7l3.2-8c-2.3.7-3.9 2.8-3.9 5.3"/><path d="m44 40.9c2.5-.5 4.4-2.8 4.4-5.4 0-1.2-.4-2.3-1-3.2l-3.4 8.6"/><path d="m42.8 29.9c-.1 0-.1 0-.2 0l-3.8 9.5c.3.3.6.5.9.7l3.9-10.1c-.2-.1-.5-.1-.8-.1"/></g><g fill="#fff"><path d="m43.7 29.9l-3.9 10.1c.9.6 1.9.9 3 .9.4 0 .8 0 1.2-.1l3.3-8.7c-.8-1.1-2.1-1.9-3.6-2.2"/><path d="m41.2 30.1l-3.2 8c.3.4.6.9.9 1.2l3.8-9.5c-.5.1-1 .2-1.5.3"/></g><path d="m60.1 26.1c0 13.3.7-6.8-28.1-6.8-29 0-28.2 20.1-28.2 6.8 0-13.3 12.6-19.1 28.1-19.1 15.6 0 28.2 5.8 28.2 19.1" fill="#ff4848"/><path d="m6.7 33.6c0 0-6-2.4-4.4-6.2.6-1.5 4.3-1.1 5.7-2 1.7-1.1 3.6-5.6 5.6-6.1 1.2-.3 3.3 1.9 4.5 1.8 1.9-.2 4.3-3.9 6.1-4.3 2.3-.4 6.8 2.5 9.1 2.4 2-.1 5.4-3.3 7.3-3.1 2.2.2 4.9 4.3 6.9 5.1 1.9.7 6.5-.7 8 .5 1 .8.3 3.9 1 4.9.9 1.3 5.4 1.9 5.4 3.4 0 3.6-5.2 4-5.2 4s.9-2.6.5-3.1c-.8-1.1-4.6-1.2-5.3-2.5-.6-1.2 1-3.2.1-4.1-1.4-1.4-4.8.9-6.8.5-1.7-.4-3.9-4-5.7-4.1-1.9-.1-4.7 3.3-6.6 3.4-1.8.1-5-2.7-6.7-2.4-2 .3-4.3 4.7-6.3 4.7-1.6 0-4.3-3.3-5.9-2.9-1.9.4-1.7 4.9-3.4 5.9-1 .6-3.8-.8-4.7 0-.5.6.8 4.2.8 4.2" fill="#fff"/></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><ellipse cx="31.9" cy="13" rx="19.7" ry="11" fill="#d93d3d"/><ellipse cx="31.9" cy="16.8" rx="24" ry="11" fill="#e2e9ed"/><path d="M61.8,62H2c0-11.8,13.4-12.9,29.9-12.9C48.4,49.1,61.8,50.2,61.8,62z" fill="#ff4848"/><path d="m51.7 50.7c0 1.4-3.7 1.4-4.9 2.5-.9.9-.1 4.6-1.5 5.3-1.2.6-3.8-2.3-5.3-1.9-1.3.3-2.1 4.1-3.6 4.3-1.4.2-3-3.3-4.5-3.3-1.5 0-3.1 3.5-4.5 3.3-1.5-.2-2.3-4-3.6-4.3-1.5-.4-4.1 2.5-5.3 1.9-1.5-.7-.6-4.4-1.5-5.3-1.2-1.1-4.9-1.1-4.9-2.5.1-1.4 39.6-1.4 39.6 0" fill="#fff"/><path d="m54.3 25.9c-13.8-13.9-31.1-13.9-44.9 0l.1 15.4c0 6.7 6.6 14 22.8 14 15.4 0 22-6 22-14v-15.4" fill="#ffdd67"/><path d="m38.3 46.2c.1.1.2.3.2.5 0 1.5-3 3.3-6.6 3.3s-6.7-1.8-6.7-3.3c0-.2.1-.4.2-.6 0 0 2.9 1.3 6.5 1.3 3.6.1 6.4-1.2 6.4-1.2" fill="#454749"/><path d="m31.9 8.3c-26.9 0-31.6 21.2-22.4 28.5 0 0 4.6-7.8 14.3-11.6 3.2-1.2 5.9-2.4 8.1-3.6 2.2 1.1 4.9 2.3 8.1 3.6 9.7 3.7 14.3 11.6 14.3 11.6 9.2-7.3 4.5-28.5-22.4-28.5" fill="#8b9fa5"/><g fill="#454749"><path d="m41.5 48.6c-.5 0-1-.1-1.5-.3-.5-.2-.9-.5-1.3-.8-.8-.6-1.4-1.6-1.4-2.6.7.7 1.3 1.3 2 1.9.7.6 1.5 1.1 2.2 1.8"/><path d="m22.2 48.6c.7-.7 1.5-1.2 2.1-1.8.7-.6 1.3-1.2 2-1.9 0 1-.7 1.9-1.4 2.6-.4.3-.8.6-1.3.8-.4.1-.9.3-1.4.3"/><path d="m19.3 36.7l-.3-2.7c.7-.1 1.7-.3 2.8-.5 5.2-1 13.9-2.7 23.4.5l-.9 2.5c-8.8-3-17.1-1.4-22-.4-1.2.3-2.2.5-3 .6"/><ellipse cx="21" cy="35.4" rx="8" ry="8"/></g><ellipse cx="21" cy="35.4" rx="5.5" ry="5.5" fill="#b4d7ee"/><path d="m50.8 35.4c0 4.4-3.6 8-8 8-4.4 0-8-3.6-8-8s3.6-8 8-8c4.4 0 8 3.6 8 8" fill="#454749"/><path d="m48.3 35.4c0 3-2.5 5.5-5.5 5.5-3 0-5.5-2.5-5.5-5.5s2.4-5.5 5.5-5.5c3 0 5.5 2.5 5.5 5.5" fill="#b4d7ee"/><path d="m60 26.1c0 13.3.7-6.8-28.1-6.8-28.8 0-28.1 20.1-28.1 6.8 0-13.3 12.6-19.1 28.1-19.1 15.5 0 28.1 5.8 28.1 19.1" fill="#ff4848"/><path d="m6.8 33.6c0 0-6-2.4-4.3-6.2.6-1.5 4.3-1.1 5.7-2 1.7-1.1 3.6-5.6 5.6-6.1 1.2-.3 3.3 1.9 4.5 1.8 1.9-.2 4.2-3.9 6.1-4.3 2.3-.4 6.8 2.5 9.1 2.4 2-.1 5.3-3.3 7.3-3.1 2.2.2 4.9 4.3 6.9 5.1 1.9.7 6.5-.7 8 .5 1 .8.3 3.9 1 4.9.9 1.3 5.3 1.9 5.3 3.4 0 3.6-5.2 4-5.2 4s.9-2.6.5-3.1c-.8-1.1-4.6-1.2-5.2-2.5-.6-1.2 1-3.2.1-4.1-1.4-1.4-4.8.9-6.8.5-1.7-.4-3.9-4-5.7-4.1-1.9-.1-4.7 3.3-6.6 3.4-1.8.1-4.9-2.7-6.7-2.4-2 .3-4.3 4.7-6.3 4.7-1.6 0-4.3-3.3-5.9-2.9-1.9.4-1.7 4.9-3.4 5.9-1 .6-3.8-.8-4.6 0-.8.6.6 4.2.6 4.2" fill="#fff"/></svg>
data/config/index.json CHANGED
@@ -14475,6 +14475,19 @@
14475
14475
  ],
14476
14476
  "moji": "💎"
14477
14477
  },
14478
+ "gay_pride_flag": {
14479
+ "unicode": "1F3F3-1F308",
14480
+ "unicode_alternates": [],
14481
+ "name": "gay_pride_flag",
14482
+ "shortname": ":gay_pride_flag:",
14483
+ "category": "extras",
14484
+ "aliases": [
14485
+ ":rainbow_flag:"
14486
+ ],
14487
+ "aliases_ascii": [],
14488
+ "keywords": [],
14489
+ "moji": "🏳🌈"
14490
+ },
14478
14491
  "gemini": {
14479
14492
  "unicode": "264A",
14480
14493
  "unicode_alternates": [
@@ -16830,7 +16843,6 @@
16830
16843
  "0:-)",
16831
16844
  "0:)",
16832
16845
  "0;^)",
16833
- "O:-)",
16834
16846
  "O:)",
16835
16847
  "O;-)",
16836
16848
  "O=)",
@@ -28506,6 +28518,21 @@
28506
28518
  ],
28507
28519
  "moji": "💬"
28508
28520
  },
28521
+ "speech_left": {
28522
+ "unicode": "1F5E8",
28523
+ "unicode_alternates": [
28524
+ "1F5E8-FE0F"
28525
+ ],
28526
+ "name": "left speech bubble",
28527
+ "shortname": ":speech_left:",
28528
+ "category": "symbols",
28529
+ "aliases": [
28530
+ ":left_speech_bubble:"
28531
+ ],
28532
+ "aliases_ascii": [],
28533
+ "keywords": [],
28534
+ "moji": "🗨"
28535
+ },
28509
28536
  "speedboat": {
28510
28537
  "unicode": "1F6A4",
28511
28538
  "unicode_alternates": [],
@@ -10,6 +10,7 @@ module Gemojione
10
10
  @emoji_by_moji = {}
11
11
  @emoji_by_ascii = {}
12
12
  @emoji_by_code = {}
13
+ @emoji_by_keyword = {}
13
14
 
14
15
  emoji_list.each do |key, emoji_hash|
15
16
 
@@ -31,6 +32,11 @@ module Gemojione
31
32
 
32
33
  moji = emoji_hash['moji']
33
34
  @emoji_by_moji[moji] = emoji_hash if moji
35
+
36
+ emoji_hash['keywords'].each do |emoji_keyword|
37
+ @emoji_by_keyword[emoji_keyword] ||= []
38
+ @emoji_by_keyword[emoji_keyword] << emoji_hash
39
+ end
34
40
  end
35
41
 
36
42
  @emoji_code_regex = /#{@emoji_by_code.keys.map{|ec| Regexp.escape(ec)}.join('|')}/
@@ -49,6 +55,10 @@ module Gemojione
49
55
  @emoji_by_ascii[ascii]
50
56
  end
51
57
 
58
+ def find_by_keyword(keyword)
59
+ @emoji_by_keyword[keyword]
60
+ end
61
+
52
62
  def unicode_moji_regex
53
63
  @emoji_moji_regex
54
64
  end
@@ -3,6 +3,10 @@ class String
3
3
  Gemojione.replace_unicode_moji_with_images(self)
4
4
  end
5
5
 
6
+ def with_emoji_names
7
+ Gemojione.replace_named_moji_with_images(self)
8
+ end
9
+
6
10
  def image_url
7
11
  Gemojione.image_url_for_name(self.emoji_data['name'])
8
12
  end
@@ -1,3 +1,3 @@
1
1
  module Gemojione
2
- VERSION = "3.0.1"
2
+ VERSION = "3.1.0"
3
3
  end
data/test/index_test.rb CHANGED
@@ -17,6 +17,17 @@ describe Gemojione::Index do
17
17
  end
18
18
  end
19
19
 
20
+ describe "find_by_keyword" do
21
+ it 'should find all emoji with glasses keyword' do
22
+ glasses_emoji = index.find_by_keyword('glasses')
23
+ assert glasses_emoji
24
+ assert glasses_emoji.length == 5
25
+ glasses_emoji.each do |emoji_hash|
26
+ assert_includes(emoji_hash['keywords'], 'glasses')
27
+ end
28
+ end
29
+ end
30
+
20
31
  describe 'find by ascii' do
21
32
  it 'returns the heart emoji' do
22
33
  assert index.find_by_ascii('<3')['unicode'] == "2764"
@@ -11,6 +11,14 @@ describe String, 'with Emoji extensions' do
11
11
  end
12
12
  end
13
13
 
14
+ describe '#with_emoji_names' do
15
+ it 'should replace named moji with an img tag' do
16
+ base_string = "I :heart: Emoji"
17
+ replaced_string = base_string.with_emoji_names
18
+ assert_equal "I <img alt=\"❤\" class=\"emoji\" src=\"http://localhost:3000/2764.png\"> Emoji", replaced_string
19
+ end
20
+ end
21
+
14
22
  describe '#image_url' do
15
23
  it 'should generate image_url' do
16
24
  assert_equal 'http://localhost:3000/1F300.png', '🌀'.image_url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemojione
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Klabnik
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-07-16 00:00:00.000000000 Z
13
+ date: 2016-07-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -652,6 +652,7 @@ files:
652
652
  - assets/png/1F3EE.png
653
653
  - assets/png/1F3EF.png
654
654
  - assets/png/1F3F0.png
655
+ - assets/png/1F3F3-1F308.png
655
656
  - assets/png/1F3F3.png
656
657
  - assets/png/1F3F4.png
657
658
  - assets/png/1F3F5.png
@@ -1265,6 +1266,7 @@ files:
1265
1266
  - assets/png/1F5DE.png
1266
1267
  - assets/png/1F5E1.png
1267
1268
  - assets/png/1F5E3.png
1269
+ - assets/png/1F5E8.png
1268
1270
  - assets/png/1F5EF.png
1269
1271
  - assets/png/1F5F3.png
1270
1272
  - assets/png/1F5FA.png
@@ -2444,6 +2446,7 @@ files:
2444
2446
  - assets/svg/1F3EE.svg
2445
2447
  - assets/svg/1F3EF.svg
2446
2448
  - assets/svg/1F3F0.svg
2449
+ - assets/svg/1F3F3-1F308.svg
2447
2450
  - assets/svg/1F3F3.svg
2448
2451
  - assets/svg/1F3F4.svg
2449
2452
  - assets/svg/1F3F5.svg
@@ -3057,6 +3060,7 @@ files:
3057
3060
  - assets/svg/1F5DE.svg
3058
3061
  - assets/svg/1F5E1.svg
3059
3062
  - assets/svg/1F5E3.svg
3063
+ - assets/svg/1F5E8.svg
3060
3064
  - assets/svg/1F5EF.svg
3061
3065
  - assets/svg/1F5F3.svg
3062
3066
  - assets/svg/1F5FA.svg