summaryrefslogtreecommitdiff
path: root/lib/gitlab/emoji.rb
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-06-25 15:48:12 -0600
committerConnor Shea <connor.james.shea@gmail.com>2016-06-29 14:53:09 -0600
commitf31f78cea32b1650d5cb0a7784a28848b8446e89 (patch)
tree07996228b1a7fd9e3335a0be680a55c6dc010997 /lib/gitlab/emoji.rb
parent84113d7e725dcf6f9a3945853475f0cede957fec (diff)
downloadgitlab-ce-f31f78cea32b1650d5cb0a7784a28848b8446e89.tar.gz
Add emoji.rb in lib/gitlab instead of using the gitlab_emoji gem.update-gemoji
No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier. Also fix the Rake task and update gemojione to 2.6.1. This adds the EmojiOne Spring update. Changelog: https://github.com/jonathanwiesel/gemojione/blob/master/CHANGELOG.md
Diffstat (limited to 'lib/gitlab/emoji.rb')
-rw-r--r--lib/gitlab/emoji.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/gitlab/emoji.rb b/lib/gitlab/emoji.rb
new file mode 100644
index 00000000000..b63213ae208
--- /dev/null
+++ b/lib/gitlab/emoji.rb
@@ -0,0 +1,21 @@
+module Gitlab
+ module Emoji
+ extend self
+
+ def emojis
+ Gemojione.index.instance_variable_get(:@emoji_by_name)
+ end
+
+ def emojis_by_moji
+ Gemojione.index.instance_variable_get(:@emoji_by_moji)
+ end
+
+ def emojis_names
+ emojis.keys.sort
+ end
+
+ def emoji_filename(name)
+ emojis[name]["unicode"]
+ end
+ end
+end