ruby_emoji 0.1.0 → 0.2.0
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/Gemfile.lock +2 -0
- data/README.md +8 -0
- data/lib/ruby_emoji/extension.rb +2 -0
- data/lib/ruby_emoji/parser.rb +4 -0
- data/lib/ruby_emoji/version.rb +1 -1
- data/lib/ruby_emoji.rb +60 -70
- data/ruby_emoji.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0820529b953e560d7992fd244b03517dc74d0a5a
|
4
|
+
data.tar.gz: 54b7af012448251afdf487cc4947591eb6cf893e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5366c859a819f060811b441124bf1bc46d794efae1b861025fd3919e44923bb2010dfd05bec6ad64bc143cd544247e6c413dc867b8e57b88ec5079c7e7f9db2a
|
7
|
+
data.tar.gz: 4f492c31d66f7b9df16c9ea777aa9091b578038c7b8e188bd19e9624b9ea0654e976f2a1dc7382b7b0b058bac8705f30c57e2f52837f02928f184fe2faa641b1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,14 @@ A gem to convert the ":"-notation into an emoji.
|
|
4
4
|
|
5
5
|
*THE GEM IS NOT YET FINISHED!*
|
6
6
|
|
7
|
+
Status right now: 
|
8
|
+
|
9
|
+
|
10
|
+
### Build status
|
11
|
+
|
12
|
+
[](https://travis-ci.org/Elektron1c97/ruby_emoji)
|
13
|
+
|
14
|
+
|
7
15
|
### Installation
|
8
16
|
|
9
17
|
Install the latest stable release:
|
data/lib/ruby_emoji/extension.rb
CHANGED
data/lib/ruby_emoji/parser.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
module RubyEmoji
|
2
|
+
# The Parser to parse a string to an emoji string
|
2
3
|
class Parser
|
4
|
+
|
5
|
+
# Initialize it with the string you want to convert
|
3
6
|
def initialize(string)
|
4
7
|
@string = string
|
5
8
|
end
|
6
9
|
|
10
|
+
# Returns the converted string
|
7
11
|
def parse
|
8
12
|
parts = @string.split(" ")
|
9
13
|
results = parts.map do |part|
|
data/lib/ruby_emoji/version.rb
CHANGED
data/lib/ruby_emoji.rb
CHANGED
@@ -3,22 +3,23 @@ require "ruby_emoji/parser"
|
|
3
3
|
require "ruby_emoji/extension"
|
4
4
|
|
5
5
|
module RubyEmoji
|
6
|
+
|
7
|
+
# Parse a string to convert the colon notation into a real emoji.
|
8
|
+
#
|
9
|
+
# Example:
|
10
|
+
# >> RubyEmoji.parse(":grin: :green_heart:")
|
11
|
+
# => "😁 💚"
|
6
12
|
def self.parse(string)
|
7
13
|
parser = Parser.new(string)
|
8
14
|
parser.parse
|
9
15
|
end
|
10
16
|
|
11
|
-
def self.hash_parse(string)
|
12
|
-
parser = Parser.new(string)
|
13
|
-
parser.hash_parse
|
14
|
-
end
|
15
|
-
|
16
17
|
EMOJI_LIST = {
|
17
18
|
":smile:"=>"😄",
|
18
19
|
":laughing:"=>"😆",
|
19
20
|
":blush:"=>"😊",
|
20
21
|
":smiley:"=>"😃",
|
21
|
-
":relaxed:"=>"",
|
22
|
+
":relaxed:"=>"☺️",
|
22
23
|
":smirk:"=>"😏",
|
23
24
|
":heart_eyes:"=>"😍",
|
24
25
|
":kissing_heart:"=>"😘",
|
@@ -103,41 +104,41 @@ module RubyEmoji
|
|
103
104
|
":notes:"=>"🎶",
|
104
105
|
":musical_note:"=>"🎵",
|
105
106
|
":fire:"=>"🔥",
|
106
|
-
":hankey:"=>"",
|
107
|
-
":poop:"=>"",
|
108
|
-
":shit:"=>"",
|
109
|
-
":+1:"=>"",
|
110
|
-
":thumbsup:"=>"",
|
111
|
-
":-1:"=>"",
|
112
|
-
":thumbsdown:"=>"",
|
113
|
-
":ok_hand:"=>"",
|
114
|
-
":punch:"=>"",
|
115
|
-
":facepunch:"=>"",
|
107
|
+
":hankey:"=>"💩",
|
108
|
+
":poop:"=>"💩",
|
109
|
+
":shit:"=>"💩",
|
110
|
+
":+1:"=>"👍",
|
111
|
+
":thumbsup:"=>"👍",
|
112
|
+
":-1:"=>"👎",
|
113
|
+
":thumbsdown:"=>"👎",
|
114
|
+
":ok_hand:"=>"👌",
|
115
|
+
":punch:"=>"👊",
|
116
|
+
":facepunch:"=>"👊",
|
116
117
|
":fist:"=>"✊",
|
117
118
|
":v:"=>"✌",
|
118
|
-
":wave:"=>"",
|
119
|
-
":hand:"=>"",
|
119
|
+
":wave:"=>"👋",
|
120
|
+
":hand:"=>"✋",
|
120
121
|
":raised_hand:"=>"✋",
|
121
|
-
":open_hands:"=>"",
|
122
|
-
":point_up:"=>"",
|
123
|
-
":point_down:"=>"",
|
124
|
-
":point_left:"=>"",
|
125
|
-
":point_right:"=>"",
|
122
|
+
":open_hands:"=>"👐",
|
123
|
+
":point_up:"=>"☝",
|
124
|
+
":point_down:"=>"👇",
|
125
|
+
":point_left:"=>"👈",
|
126
|
+
":point_right:"=>"👉",
|
126
127
|
":raised_hands:"=>"🙌",
|
127
128
|
":pray:"=>"🙏",
|
128
|
-
":point_up_2:"=>"",
|
129
|
-
":clap:"=>"",
|
130
|
-
":muscle:"=>"",
|
131
|
-
":metal:"=>"",
|
132
|
-
":fu:"=>"",
|
129
|
+
":point_up_2:"=>"👆",
|
130
|
+
":clap:"=>"👏",
|
131
|
+
":muscle:"=>"💪",
|
132
|
+
":metal:"=>"🤘",
|
133
|
+
":fu:"=>"🖕",
|
133
134
|
":runner:"=>"🏃",
|
134
|
-
":running:"=>"",
|
135
|
-
":couple:"=>"",
|
135
|
+
":running:"=>"🏃",
|
136
|
+
":couple:"=>"👫",
|
136
137
|
":family:"=>"👪",
|
137
138
|
":two_men_holding_hands:"=>"👬",
|
138
139
|
":two_women_holding_hands:"=>"👭",
|
139
140
|
":dancer:"=>"💃",
|
140
|
-
":dancers:"=>"",
|
141
|
+
":dancers:"=>"👯",
|
141
142
|
":ok_woman:"=>"🙆",
|
142
143
|
":no_good:"=>"🙅",
|
143
144
|
":information_desk_person:"=>"💁",
|
@@ -146,11 +147,11 @@ module RubyEmoji
|
|
146
147
|
":person_with_pouting_face:"=>"🙎",
|
147
148
|
":person_frowning:"=>"🙍",
|
148
149
|
":bow:"=>"🙇",
|
149
|
-
":couplekiss:"=>"",
|
150
|
+
":couplekiss:"=>"💏",
|
150
151
|
":couple_with_heart:"=>"💑",
|
151
|
-
":massage:"=>"",
|
152
|
+
":massage:"=>"💆",
|
152
153
|
":haircut:"=>"💇",
|
153
|
-
":nail_care:"=>"",
|
154
|
+
":nail_care:"=>"💅",
|
154
155
|
":boy:"=>"👦",
|
155
156
|
":girl:"=>"👧",
|
156
157
|
":woman:"=>"👩",
|
@@ -162,8 +163,8 @@ module RubyEmoji
|
|
162
163
|
":man_with_gua_pi_mao:"=>"👲",
|
163
164
|
":man_with_turban:"=>"👳",
|
164
165
|
":construction_worker:"=>"👷",
|
165
|
-
":cop:"=>"",
|
166
|
-
":angel:"=>"",
|
166
|
+
":cop:"=>"👮",
|
167
|
+
":angel:"=>"👼",
|
167
168
|
":princess:"=>"👸",
|
168
169
|
":smiley_cat:"=>"😺",
|
169
170
|
":smile_cat:"=>"😸",
|
@@ -181,8 +182,8 @@ module RubyEmoji
|
|
181
182
|
":speak_no_evil:"=>"🙊",
|
182
183
|
":guardsman:"=>"💂",
|
183
184
|
":skull:"=>"💀",
|
184
|
-
":feet:"=>"",
|
185
|
-
":lips:"=>"",
|
185
|
+
":feet:"=>"🐾",
|
186
|
+
":lips:"=>"👄",
|
186
187
|
":kiss:"=>"💏",
|
187
188
|
":droplet:"=>"💧",
|
188
189
|
":ear:"=>"👂",
|
@@ -194,39 +195,28 @@ module RubyEmoji
|
|
194
195
|
":busts_in_silhouette:"=>"👥",
|
195
196
|
":speech_balloon:"=>"💬",
|
196
197
|
":thought_balloon:"=>"💭",
|
197
|
-
":
|
198
|
-
":
|
199
|
-
":goberserk:"=>"",
|
200
|
-
":godmode:"=>"",
|
201
|
-
":hurtrealbad:"=>"",
|
202
|
-
":rage1:"=>"",
|
203
|
-
":rage2:"=>"",
|
204
|
-
":rage3:"=>"",
|
205
|
-
":rage4:"=>"",
|
206
|
-
":suspect:"=>"",
|
207
|
-
":trollface:"=>"",
|
208
|
-
":sunny:"=>"",
|
209
|
-
":umbrella:"=>"",
|
198
|
+
":sunny:"=>"☀️",
|
199
|
+
":umbrella:"=>"☔️",
|
210
200
|
":cloud:"=>"☁",
|
211
201
|
":snowflake:"=>"❄",
|
212
|
-
":snowman:"=>"",
|
213
|
-
":zap:"=>"",
|
202
|
+
":snowman:"=>"⛄️",
|
203
|
+
":zap:"=>"⚡️",
|
214
204
|
":cyclone:"=>"🌀",
|
215
205
|
":foggy:"=>"🌁",
|
216
|
-
":ocean:"=>"",
|
217
|
-
":cat:"=>"
|
218
|
-
":dog:"=>"
|
219
|
-
":mouse:"=>"
|
206
|
+
":ocean:"=>"🌊",
|
207
|
+
":cat:"=>"🐱",
|
208
|
+
":dog:"=>"🐶",
|
209
|
+
":mouse:"=>"🐭",
|
220
210
|
":hamster:"=>"🐹",
|
221
|
-
":rabbit:"=>"
|
211
|
+
":rabbit:"=>"🐰",
|
222
212
|
":wolf:"=>"🐺",
|
223
213
|
":frog:"=>"🐸",
|
224
|
-
":tiger:"=>"
|
214
|
+
":tiger:"=>"🐯",
|
225
215
|
":koala:"=>"🐨",
|
226
216
|
":bear:"=>"🐻",
|
227
|
-
":pig:"=>"
|
217
|
+
":pig:"=>"🐷",
|
228
218
|
":pig_nose:"=>"🐽",
|
229
|
-
":cow:"=>"
|
219
|
+
":cow:"=>"🐮",
|
230
220
|
":boar:"=>"🐗",
|
231
221
|
":monkey_face:"=>"🐵",
|
232
222
|
":monkey:"=>"🐒",
|
@@ -252,28 +242,28 @@ module RubyEmoji
|
|
252
242
|
":octopus:"=>"🐙",
|
253
243
|
":tropical_fish:"=>"🐠",
|
254
244
|
":fish:"=>"🐟",
|
255
|
-
":whale:"=>"
|
256
|
-
":whale2:"=>"",
|
245
|
+
":whale:"=>"🐳",
|
246
|
+
":whale2:"=>"🐋",
|
257
247
|
":dolphin:"=>"🐬",
|
258
|
-
":cow2:"=>"",
|
248
|
+
":cow2:"=>"🐄",
|
259
249
|
":ram:"=>"🐏",
|
260
250
|
":rat:"=>"🐀",
|
261
251
|
":water_buffalo:"=>"🐃",
|
262
|
-
":tiger2:"=>"",
|
263
|
-
":rabbit2:"=>"",
|
252
|
+
":tiger2:"=>"🐅",
|
253
|
+
":rabbit2:"=>"🐇",
|
264
254
|
":dragon:"=>"🐉",
|
265
255
|
":goat:"=>"🐐",
|
266
256
|
":rooster:"=>"🐓",
|
267
|
-
":dog2:"=>"",
|
268
|
-
":pig2:"=>"",
|
269
|
-
":mouse2:"=>"",
|
257
|
+
":dog2:"=>"🐕",
|
258
|
+
":pig2:"=>"🐖",
|
259
|
+
":mouse2:"=>"🐁",
|
270
260
|
":ox:"=>"🐂",
|
271
261
|
":dragon_face:"=>"🐲",
|
272
262
|
":blowfish:"=>"🐡",
|
273
263
|
":crocodile:"=>"🐊",
|
274
264
|
":dromedary_camel:"=>"🐪",
|
275
265
|
":leopard:"=>"🐆",
|
276
|
-
":cat2:"=>"",
|
266
|
+
":cat2:"=>"🐈",
|
277
267
|
":poodle:"=>"🐩",
|
278
268
|
":paw_prints:"=>"🐾",
|
279
269
|
":bouquet:"=>"💐",
|
data/ruby_emoji.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_emoji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yves Siegrist
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description:
|
42
56
|
email:
|
43
57
|
- Elektron1c97@gmail.com
|