diff options
author | Robert Speicher <robert@gitlab.com> | 2016-07-18 23:57:13 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-07-18 23:57:13 +0000 |
commit | a27212ab908d5161f5a75b27c4616c11f497f5d4 (patch) | |
tree | 1ea443ffcba833a262294c232950c15e8cb682a7 /lib/gitlab | |
parent | ac828424646e14ec9d2032421c5ada91a8fd7dc9 (diff) | |
parent | 6a06c5cfb92d7d4e390e63104fd42d24a9159048 (diff) | |
download | gitlab-ce-a27212ab908d5161f5a75b27c4616c11f497f5d4.tar.gz |
Merge branch 'cs-gemojione-3' into 'master'
Upgrade gemojione to 3.0.0
Upgrades gemojione to 3.0.0, see the Changelog: https://github.com/jonathanwiesel/gemojione/blob/b98aa8b07eef815d4d3f52ff3c8714b28932b0de/CHANGELOG.md#v300-2016-07-12
[Here are all the new 2016 emoji](http://emojione.com/releases/2.2.4/) :tada:
This update has new emoji and more sensical categories.
See merge request !5237
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/award_emoji.rb | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/lib/gitlab/award_emoji.rb b/lib/gitlab/award_emoji.rb index c94bfc0e65f..39b43ab5489 100644 --- a/lib/gitlab/award_emoji.rb +++ b/lib/gitlab/award_emoji.rb @@ -1,24 +1,14 @@ module Gitlab class AwardEmoji CATEGORIES = { - other: "Other", objects: "Objects", - places: "Places", - travel_places: "Travel", - emoticons: "Emoticons", - objects_symbols: "Symbols", + travel: "Travel", + symbols: "Symbols", nature: "Nature", - celebration: "Celebration", people: "People", activity: "Activity", flags: "Flags", - food_drink: "Food" - }.with_indifferent_access - - CATEGORY_ALIASES = { - symbols: "objects_symbols", - foods: "food_drink", - travel: "travel_places" + food: "Food" }.with_indifferent_access def self.normalize_emoji_name(name) @@ -35,7 +25,7 @@ module Gitlab # Skip Fitzpatrick(tone) modifiers next if data["category"] == "modifier" - category = CATEGORY_ALIASES[data["category"]] || data["category"] + category = data["category"] @emoji_by_category[category] << data end @@ -57,9 +47,9 @@ module Gitlab def self.aliases @aliases ||= begin - json_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json' ) - JSON.parse(File.read(json_path)) - end + json_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json') + JSON.parse(File.read(json_path)) + end end # Returns an Array of Emoji names and their asset URLs. |