summaryrefslogtreecommitdiff
path: root/lib/award_emoji.rb
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-12-11 13:10:00 +0200
committerValery Sizov <valery@gitlab.com>2015-12-11 13:17:12 +0200
commit72b7d1f59d4fb26fb9119c5a059528f0fc951904 (patch)
tree18faa50e9d67746be474577f395c720ff49df81b /lib/award_emoji.rb
parentcd97dba2a9a26e83818f7e111bc0b0185a7ced8a (diff)
downloadgitlab-ce-72b7d1f59d4fb26fb9119c5a059528f0fc951904.tar.gz
emoji aliases problem
Diffstat (limited to 'lib/award_emoji.rb')
-rw-r--r--lib/award_emoji.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/award_emoji.rb b/lib/award_emoji.rb
index d58a196c4ef..4d99164bc33 100644
--- a/lib/award_emoji.rb
+++ b/lib/award_emoji.rb
@@ -6,7 +6,42 @@ class AwardEmoji
"ambulance", "anguished", "two_hearts", "wink"
]
+ ALIASES = {
+ pout: "rage",
+ satisfied: "laughing",
+ hankey: "shit",
+ poop: "shit",
+ collision: "boom",
+ thumbsup: "+1",
+ thumbsdown: "-1",
+ punch: "facepunch",
+ raised_hand: "hand",
+ running: "runner",
+ ng_woman: "no_good",
+ shoe: "mans_shoe",
+ tshirt: "shirt",
+ honeybee: "bee",
+ flipper: "dolphin",
+ paw_prints: "feet",
+ waxing_gibbous_moon: "moon",
+ telephone: "phone",
+ knife: "hocho",
+ envelope: "email",
+ pencil: "memo",
+ open_book: "book",
+ sailboat: "boat",
+ red_car: "car",
+ lantern: "izakaya_lantern",
+ uk: "gb",
+ heavy_exclamation_mark: "exclamation",
+ squirrel: "shipit"
+ }.with_indifferent_access
+
def self.path_to_emoji_image(name)
"emoji/#{Emoji.emoji_filename(name)}.png"
end
+
+ def self.normilize_emoji_name(name)
+ ALIASES[name] || name
+ end
end