Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a844c2c1f7 | ||
|
|
ece49a0f11 | ||
|
|
27e6ef7bc0 | ||
|
|
b67f98a130 | ||
|
|
282ae85ea0 | ||
|
|
baa55a8eda | ||
|
|
4db892b66b | ||
|
|
8db84353e4 | ||
|
|
7f9b0eaca9 | ||
|
|
3e9c7cc8fb | ||
|
|
808cb099de | ||
|
|
8441803d17 | ||
|
|
8781d47ddb | ||
|
|
88fce2aa9e | ||
|
|
b9fa07e0e2 | ||
|
|
6723776d77 | ||
|
|
5179cd8159 | ||
|
|
198d829f42 | ||
|
|
5446d53d36 | ||
|
|
77e1fb9e71 | ||
|
|
cf468c1cfd | ||
|
|
6d538220a2 | ||
|
|
cf1632ef7a | ||
|
|
de74b4ec57 | ||
|
|
f7af2578a1 | ||
|
|
08ddb3bd7d | ||
|
|
bde981dad7 | ||
|
|
13f9ecc764 | ||
|
|
33adca56ea |
12
LICENSE
@@ -1,14 +1,14 @@
|
||||
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.
|
||||
|
||||
27
MAINTAINING.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Maintainers
|
||||
|
||||
## Releasing a new gem
|
||||
|
||||
If you are just adding new emoji or making a small fix, only increment the patch level "1.0.x". If you need to rename a ton of emojis or making any other radical (but still mostly backwards compatible changes), bump the minor version "1.x.x".
|
||||
|
||||
### Make a release commit
|
||||
|
||||
To prepare the release commit, edit the [gemoji.gemspec](https://github.com/github/gemoji/blob/master/gemoji.gemspec) `version` value. Then make a single commit with the description as "Gemoji 1.x.x". Finally, tag the commit with `v1.x.x`.
|
||||
|
||||
Example commit https://github.com/github/gemoji/commit/v1.0.0
|
||||
|
||||
```
|
||||
$ git ci -m "Gemoji 1.0.0"
|
||||
$ git tag v1.0.0
|
||||
$ git push
|
||||
$ git push --tags
|
||||
```
|
||||
|
||||
### Publish the gem
|
||||
|
||||
Build and push the new gem with
|
||||
|
||||
```
|
||||
$ gem build gemoji.gemspec
|
||||
$ gem push gemoji-1.0.0.gem
|
||||
```
|
||||
37
README.md
@@ -5,17 +5,48 @@ Emoji images and names. See the LICENSE for copyright information.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
------------
|
||||
|
||||
Add `gemoji` to you Gemfile.
|
||||
|
||||
``` ruby
|
||||
gem 'gemoji', :require => 'emoji/railtie'
|
||||
gem 'gemoji'
|
||||
```
|
||||
|
||||
**Sync images**
|
||||
|
||||
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**
|
||||
|
||||
If you must, you can manually add all the images to your asset load path.
|
||||
|
||||
``` ruby
|
||||
# config/application.rb
|
||||
config.assets.paths << Emoji.images_path
|
||||
```
|
||||
|
||||
Then have them compiled to public on deploy.
|
||||
|
||||
``` ruby
|
||||
# config/application.rb
|
||||
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 may not be ideal for referencing from cached content.
|
||||
|
||||
|
||||
Example Rails Helper
|
||||
====================
|
||||
--------------------
|
||||
|
||||
This would allow emojifying content such as: `it's raining :cats: and :dogs:!`
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "gemoji"
|
||||
s.version = "1.2.1"
|
||||
s.version = "1.4.0"
|
||||
s.summary = "Emoji Assets"
|
||||
s.description = "Emoji assets"
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1e8.png
|
||||
unicode/1f1e8-1f1f3.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1e9.png
|
||||
unicode/1f1e9-1f1ea.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1ea.png
|
||||
unicode/1f1ea-1f1f8.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1eb.png
|
||||
unicode/1f1eb-1f1f7.png
|
||||
BIN
images/emoji/fu.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
@@ -1 +1 @@
|
||||
unicode/1f1ec.png
|
||||
unicode/1f1ec-1f1e7.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1ee.png
|
||||
unicode/1f1ee-1f1f9.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1ef.png
|
||||
unicode/1f1ef-1f1f5.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1f0.png
|
||||
unicode/1f1f0-1f1f7.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1f7.png
|
||||
unicode/1f1f7-1f1fa.png
|
||||
@@ -1 +1 @@
|
||||
unicode/1f1ec.png
|
||||
unicode/1f1ec-1f1e7.png
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -1 +1 @@
|
||||
unicode/1f1fa.png
|
||||
unicode/1f1fa-1f1f8.png
|
||||
@@ -1,14 +1,6 @@
|
||||
require 'emoji'
|
||||
require 'rails'
|
||||
warn "requiring 'emoji/railtie' is deprecated. " +
|
||||
"Please manually add Emoji.images_path to your config.assets.paths."
|
||||
|
||||
module Emoji
|
||||
class Engine < Rails::Engine
|
||||
rake_tasks do
|
||||
load "tasks/emoji.rake"
|
||||
end
|
||||
|
||||
initializer :emoji, :group => :assets do |app|
|
||||
app.config.assets.paths << Emoji.images_path
|
||||
end
|
||||
end
|
||||
end
|
||||
# Automatic path configuration via a railtie is intentionally removed.
|
||||
# Please see the README for details. Any patches to readded it by a
|
||||
# non-repo collab will be closed without comment.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
task :emoji => :environment do
|
||||
desc "Copy emoji to the Rails `public/images/emoji` directory"
|
||||
task :emoji do
|
||||
require 'emoji'
|
||||
|
||||
target = "#{Rails.root}/public/images/emoji"
|
||||
target = "#{Rake.original_dir}/public/images/emoji"
|
||||
|
||||
mkdir_p "#{target}"
|
||||
Dir["#{Emoji.images_path}/emoji/*.png"].each do |src|
|
||||
|
||||