Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-07-19 02:57:13 +0300
committerRobert Speicher <robert@gitlab.com>2016-07-19 02:57:13 +0300
commita27212ab908d5161f5a75b27c4616c11f497f5d4 (patch)
tree1ea443ffcba833a262294c232950c15e8cb682a7 /lib/gitlab
parentac828424646e14ec9d2032421c5ada91a8fd7dc9 (diff)
parent6a06c5cfb92d7d4e390e63104fd42d24a9159048 (diff)
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.rb24
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.