Trevor Turk b84e5754d9 lowercase!
2012-10-24 22:34:13 -05:00
2012-10-24 22:34:13 -05:00
2012-10-02 17:05:39 -05:00
2012-10-02 17:06:00 -05:00
2012-10-02 16:30:57 -05:00

gemoji

Emoji images and names. See the LICENSE for copyright information.

Installation

Add gemoji to you Gemfile.

gem 'gemoji', :require => 'emoji/railtie'

Example Rails Helper

This would allow emojifying content such as: it's raining :cats: and :dogs:!

See the Emoji cheat sheet for more examples.

module EmojiHelper
 def emojify(content)
    h(content).to_str.gsub(/:([a-z0-9\+\-_]+):/) do |match|
      if Emoji.names.include?($1)
        '<img alt="' + $1 + '" height="20" src="' + asset_path("emoji/#{$1}.png") + '" style="vertical-align:middle" width="20" />'
      else
        match
      end
    end.html_safe if content.present?
  end
end
octocat, squirrel, shipit
Copyright (c) 2012 GitHub Inc. All rights reserved.

bowtie, neckbeard
Copyright (c) 2012 37signals, LLC. All rights reserved.

feelsgood, finnadie, goberserk, godmode, hurtrealbad, rage 1-4, suspect
Copyright (c) 2012 id Software. All rights reserved.

trollface
Copyright (c) 2012 whynne@deviantart. All rights reserved.

All other images
Copyright (c) 2012 Apple Inc. All rights reserved.
Description
Emoji library
Readme MIT 45 MiB
Languages
Ruby 85.7%
HTML 9.5%
Shell 4.8%