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
Shared Emoji assets between GitHub, Campfire, and BCX.
Emoji images and names. See the LICENSE for copyright information.
Contributing
Installation
------------
### Designers
Add `gemoji` to you Gemfile.
Drop a 64x64 png into `images/` and commit it.
``` ruby
gem 'gemoji'
```
### Others
**Sync images**
Rerun `rake` to rebuild static assets and sprites. (Trying to make this step unnecessary)
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).
Deploying
---------
``` ruby
# Rakefile
load 'tasks/emoji.rake'
```
### GitHub
```
$ rake emoji
```
1. Run `rake emoji` in app root
**Assets Precompiling**
### Campfire
If you must, you can manually add all the images to your asset load path.
1. Push changes to 37signals/emoji
2. Update emoji version in config/externals.yml
3. Run `cap local externals:setup` in app root
4. Run `rake emoji` in app root
5. Run `Rails.cache.clear` in app console
``` ruby
# config/application.rb
config.assets.paths << Emoji.images_path
```
### BCX
Then have them compiled to public on deploy.
1. Push changes to 37signals/emoji
2. Run `bundle update emoji` in app root
``` 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:!`
See the [Emoji cheat sheet](http://www.emoji-cheat-sheet.com) for more examples.
```ruby
module EmojiHelper
def emojify(content)
h(content).to_str.gsub(/:([a-z0-9\+\-_]+):/) do |match|
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.