Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
1d1ca8b9
Commit
1d1ca8b9
authored
Apr 09, 2016
by
Arinde Eniola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix emoji aliases not showing in autocomplete
parent
26f51bb0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2499 additions
and
3 deletions
+2499
-3
fixtures/emojis/digests.json
fixtures/emojis/digests.json
+2486
-1
lib/tasks/gemojione.rake
lib/tasks/gemojione.rake
+13
-2
No files found.
fixtures/emojis/digests.json
View file @
1d1ca8b9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
lib/tasks/gemojione.rake
View file @
1d1ca8b9
...
@@ -5,12 +5,23 @@ namespace :gemojione do
...
@@ -5,12 +5,23 @@ namespace :gemojione do
require
'json'
require
'json'
dir
=
Gemojione
.
index
.
images_path
dir
=
Gemojione
.
index
.
images_path
digests
=
[]
aliases
=
Hash
.
new
{
|
hash
,
key
|
hash
[
key
]
=
[]
}
aliases_path
=
File
.
join
(
Rails
.
root
,
'fixtures'
,
'emojis'
,
'aliases.json'
)
digests
=
AwardEmoji
.
emojis
.
map
do
|
name
,
emoji_hash
|
JSON
.
parse
(
File
.
read
(
aliases_path
)).
each
do
|
alias_name
,
real_name
|
aliases
[
real_name
]
<<
alias_name
end
AwardEmoji
.
emojis
.
map
do
|
name
,
emoji_hash
|
fpath
=
File
.
join
(
dir
,
"
#{
emoji_hash
[
'unicode'
]
}
.png"
)
fpath
=
File
.
join
(
dir
,
"
#{
emoji_hash
[
'unicode'
]
}
.png"
)
digest
=
Digest
::
SHA256
.
file
(
fpath
).
hexdigest
digest
=
Digest
::
SHA256
.
file
(
fpath
).
hexdigest
{
name:
name
,
unicode:
emoji_hash
[
'unicode'
],
digest:
digest
}
digests
<<
{
name:
name
,
unicode:
emoji_hash
[
'unicode'
],
digest:
digest
}
aliases
[
name
].
each
do
|
alias_name
|
digests
<<
{
name:
alias_name
,
unicode:
emoji_hash
[
'unicode'
],
digest:
digest
}
end
end
end
out
=
File
.
join
(
Rails
.
root
,
'fixtures'
,
'emojis'
,
'digests.json'
)
out
=
File
.
join
(
Rails
.
root
,
'fixtures'
,
'emojis'
,
'digests.json'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment