Commit 3403bdc5 authored by Eric Eastwood's avatar Eric Eastwood
parent d20a6033
This diff is collapsed.
......@@ -31,7 +31,7 @@ module Gitlab
end
def emoji_unicode_version(name)
@emoji_unicode_versions_by_name ||= JSON.parse(File.read(Rails.root.join('node_modules', 'emoji-unicode-version', 'emoji-unicode-version-map.json')))
@emoji_unicode_versions_by_name ||= JSON.parse(File.read(Rails.root.join('fixtures', 'emojis', 'emoji-unicode-version-map.json')))
@emoji_unicode_versions_by_name[name]
end
......
namespace :gemojione do
desc 'Generates Emoji SHA256 digests'
task digests: :environment do
task digests: ['yarn:check', 'environment'] do
require 'digest/sha2'
require 'json'
# We don't have `node_modules` available in built versions of GitLab
FileUtils.cp_r(Rails.root.join('node_modules', 'emoji-unicode-version', 'emoji-unicode-version-map.json'), File.join(Rails.root, 'fixtures', 'emojis'))
dir = Gemojione.images_path
resultant_emoji_map = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment