Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7755a8a181 | ||
|
|
69f625f36c | ||
|
|
13bcea9b4a | ||
|
|
19ddee2bdc | ||
|
|
9cd56f6e3d | ||
|
|
56da9a86e3 | ||
|
|
c180447c5b | ||
|
|
150c509735 | ||
|
|
8e098547ad | ||
|
|
968373beae | ||
|
|
cb85b7b105 | ||
|
|
bfbc8c5e98 | ||
|
|
2d799338d9 | ||
|
|
8b45468c6e | ||
|
|
d7f9549261 | ||
|
|
17946e381b | ||
|
|
f9f0527fbe | ||
|
|
a844c2c1f7 | ||
|
|
ece49a0f11 | ||
|
|
27e6ef7bc0 | ||
|
|
b67f98a130 | ||
|
|
282ae85ea0 | ||
|
|
baa55a8eda | ||
|
|
4db892b66b | ||
|
|
8db84353e4 | ||
|
|
7f9b0eaca9 | ||
|
|
3e9c7cc8fb | ||
|
|
808cb099de | ||
|
|
8441803d17 | ||
|
|
8781d47ddb | ||
|
|
88fce2aa9e | ||
|
|
b9fa07e0e2 | ||
|
|
6723776d77 | ||
|
|
5179cd8159 | ||
|
|
198d829f42 |
37
LICENSE
@@ -1,14 +1,39 @@
|
||||
octocat, squirrel, shipit
|
||||
Copyright (c) 2012 GitHub Inc. All rights reserved.
|
||||
Copyright (c) 2013 GitHub Inc. All rights reserved.
|
||||
|
||||
bowtie, neckbeard
|
||||
Copyright (c) 2012 37signals, LLC. All rights reserved.
|
||||
bowtie, neckbeard, fu
|
||||
Copyright (c) 2013 37signals, LLC. All rights reserved.
|
||||
|
||||
feelsgood, finnadie, goberserk, godmode, hurtrealbad, rage 1-4, suspect
|
||||
Copyright (c) 2012 id Software. All rights reserved.
|
||||
Copyright (c) 2013 id Software. All rights reserved.
|
||||
|
||||
trollface
|
||||
Copyright (c) 2012 whynne@deviantart. All rights reserved.
|
||||
Copyright (c) 2013 whynne@deviantart. All rights reserved.
|
||||
|
||||
All other images
|
||||
Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
Copyright (c) 2013 Apple Inc. All rights reserved.
|
||||
|
||||
Source code:
|
||||
|
||||
Copyright (c) 2013 GitHub, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
13
README.md
@@ -15,7 +15,16 @@ gem 'gemoji'
|
||||
|
||||
**Sync images**
|
||||
|
||||
Images can be copied to your public directory with `rake emoji` in your Rails app. This is the recommended approach since the images will be available at a consistent location. This works best with cached formatted user content generated by tools like [html-pipeline](https://github.com/jch/html-pipeline).
|
||||
Images can be copied to your public directory with `rake emoji` in your app. This is the recommended approach since the images will be available at a consistent location. This works best with cached formatted user content generated by tools like [html-pipeline](https://github.com/jch/html-pipeline).
|
||||
|
||||
``` ruby
|
||||
# Rakefile
|
||||
load 'tasks/emoji.rake'
|
||||
```
|
||||
|
||||
```
|
||||
$ rake emoji
|
||||
```
|
||||
|
||||
**Assets Precompiling**
|
||||
|
||||
@@ -33,7 +42,7 @@ Then have them compiled to public on deploy.
|
||||
config.assets.precompile << "emoji/*.png"
|
||||
```
|
||||
|
||||
**WARNING** Since there are a ton of images, just adding the path may slow down other lookups if you aren't using it. Compiling all the emojis on deploy will add overhead to your deploy if even the images haven't changed. Theres just so many more superfluous files to iterate over. Also, the urls will be fingerprinted which many not be ideal for referencing from cached content.
|
||||
**WARNING** Since there are a ton of images, just adding the path may slow down other lookups if you aren't using it. Compiling all the emojis on deploy will add overhead to your deploy if even the images haven't changed. Theres just so many more superfluous files to iterate over. Also, the urls will be fingerprinted which may not be ideal for referencing from cached content.
|
||||
|
||||
|
||||
Example Rails Helper
|
||||
|
||||
21
Rakefile
@@ -1,7 +1,16 @@
|
||||
desc "Checks for missing aliases to unicode sources"
|
||||
task :unnamed do
|
||||
unicodes = Dir["./images/emoji/unicode/*.png"].map { |fn| File.basename(fn) }
|
||||
aliases = Dir["./images/emoji/*.png"].select { |fn| File.symlink?(fn) }.map { |fn| File.basename(fn) }
|
||||
used_unicodes = aliases.map { |name| File.basename(File.readlink("./images/emoji/#{name}")) }.uniq
|
||||
puts unicodes - used_unicodes
|
||||
require 'rake/testtask'
|
||||
|
||||
task :default => :test
|
||||
|
||||
Rake::TestTask.new do |t|
|
||||
t.libs << "test"
|
||||
t.test_files = FileList["test/*_test.rb"]
|
||||
end
|
||||
|
||||
namespace :db do
|
||||
task :generate do
|
||||
system "cp /System/Library/Input\\ Methods/CharacterPalette.app/Contents/Resources/Category-Emoji.plist db/"
|
||||
system "plutil -convert json db/Category-Emoji.plist"
|
||||
system "mv db/Category-Emoji.plist db/Category-Emoji.json"
|
||||
end
|
||||
end
|
||||
|
||||
1
db/Category-Emoji.json
Normal file
@@ -1,6 +1,6 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "gemoji"
|
||||
s.version = "1.3.0"
|
||||
s.version = "1.5.0"
|
||||
s.summary = "Emoji Assets"
|
||||
s.description = "Emoji assets"
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
unicode/0038.png
|
||||
unicode/0038-20e3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0035.png
|
||||
unicode/0035-20e3.png
|
||||
1
images/emoji/flipper.png
Symbolic link
@@ -0,0 +1 @@
|
||||
unicode/1f42c.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0034.png
|
||||
unicode/0034-20e3.png
|
||||
BIN
images/emoji/fu.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
@@ -1 +1 @@
|
||||
unicode/0023.png
|
||||
unicode/0023-20e3.png
|
||||
1
images/emoji/loud_sound.png
Symbolic link
@@ -0,0 +1 @@
|
||||
unicode/1f50a.png
|
||||
1
images/emoji/night_with_stars.png
Symbolic link
@@ -0,0 +1 @@
|
||||
unicode/1f303.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0039.png
|
||||
unicode/0039-20e3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0031.png
|
||||
unicode/0031-20e3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0037.png
|
||||
unicode/0037-20e3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0036.png
|
||||
unicode/0036-20e3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f50a.png
|
||||
unicode/1f508.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f303.png
|
||||
unicode/1f320.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0033.png
|
||||
unicode/0033-20e3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f683.png
|
||||
unicode/1f68b.png
|
||||
@@ -1 +1 @@
|
||||
unicode/0032.png
|
||||
unicode/0032-20e3.png
|
||||
1
images/emoji/unicode/0023-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0023-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
1
images/emoji/unicode/0030-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0030-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
1
images/emoji/unicode/0031-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0031-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
1
images/emoji/unicode/0032-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0032-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
1
images/emoji/unicode/0033-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0033-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
1
images/emoji/unicode/0034-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0034-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
1
images/emoji/unicode/0035-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0035-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
1
images/emoji/unicode/0036-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0036-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
1
images/emoji/unicode/0037-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0037-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
1
images/emoji/unicode/0038-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0038-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
1
images/emoji/unicode/0039-20e3.png
Symbolic link
@@ -0,0 +1 @@
|
||||
0039-fe0f-20e3.png
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
BIN
images/emoji/unicode/1f004-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 14 B |
1
images/emoji/unicode/1f004.png
Symbolic link
@@ -0,0 +1 @@
|
||||
1f004-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 14 B |
BIN
images/emoji/unicode/1f17f-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 14 B |
1
images/emoji/unicode/1f17f.png
Symbolic link
@@ -0,0 +1 @@
|
||||
1f17f-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 14 B |
BIN
images/emoji/unicode/1f21a-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 14 B |
1
images/emoji/unicode/1f21a.png
Symbolic link
@@ -0,0 +1 @@
|
||||
1f21a-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 14 B |
BIN
images/emoji/unicode/1f22f-fe0f.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 14 B |
1
images/emoji/unicode/1f22f.png
Symbolic link
@@ -0,0 +1 @@
|
||||
1f22f-fe0f.png
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 14 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
images/emoji/unicode/1f320.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
images/emoji/unicode/1f508.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 7.6 KiB |
BIN
images/emoji/unicode/1f68b.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
images/emoji/unicode/203c-fe0f.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/203c.png
Symbolic link
@@ -0,0 +1 @@
|
||||
203c-fe0f.png
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2049-fe0f.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2049.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2049-fe0f.png
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2139-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2139.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2139-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2194-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2194.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2194-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2195-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2195.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2195-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2196-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2196.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2196-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2197-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2197.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2197-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2198-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2198.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2198-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/2199-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/2199.png
Symbolic link
@@ -0,0 +1 @@
|
||||
2199-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/21a9-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/21a9.png
Symbolic link
@@ -0,0 +1 @@
|
||||
21a9-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/21aa-fe0f.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/21aa.png
Symbolic link
@@ -0,0 +1 @@
|
||||
21aa-fe0f.png
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/231a-fe0f.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/231a.png
Symbolic link
@@ -0,0 +1 @@
|
||||
231a-fe0f.png
|
||||
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 13 B |
BIN
images/emoji/unicode/231b-fe0f.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 13 B |
1
images/emoji/unicode/231b.png
Symbolic link
@@ -0,0 +1 @@
|
||||
231b-fe0f.png
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 13 B |