Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01e1710b79 | ||
|
|
2f0ad36b67 | ||
|
|
b84e5754d9 | ||
|
|
c6af1af8f6 | ||
|
|
8190c65f76 | ||
|
|
c921ef1b5b | ||
|
|
bfa00106fc | ||
|
|
9ee88a974d | ||
|
|
e11d502d4d | ||
|
|
24cb142c5e | ||
|
|
42503f1dfa | ||
|
|
3bf04c21ab | ||
|
|
dbb7e48c66 | ||
|
|
ed273dee14 | ||
|
|
b5542d5075 | ||
|
|
e21a63645c | ||
|
|
c79a1d69d0 | ||
|
|
971bcd6236 | ||
|
|
d1d6d35da9 | ||
|
|
97f5441ada | ||
|
|
e43f1ac171 | ||
|
|
fc275cad0a | ||
|
|
38731ced7e | ||
|
|
0e3f686bbd | ||
|
|
bd929a9ee0 | ||
|
|
436209c12f | ||
|
|
24d9881f20 | ||
|
|
74372af2f8 | ||
|
|
a94b90198a | ||
|
|
25da8c9323 | ||
|
|
da797b13e3 | ||
|
|
9fa5dcd311 | ||
|
|
f2f80d4e8a | ||
|
|
315015e90e | ||
|
|
d815c7f9b7 | ||
|
|
5919a89968 | ||
|
|
3358ffbeb4 | ||
|
|
e46c8207fc | ||
|
|
ded4714831 | ||
|
|
8c15ced399 | ||
|
|
765df113e1 | ||
|
|
52210cece2 | ||
|
|
bcf62ad7cd | ||
|
|
db6bc0fb28 | ||
|
|
69e7ea119c | ||
|
|
1ebc4b1f74 | ||
|
|
a2e1d15d13 | ||
|
|
ffaef44107 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
Gemfile.lock
|
||||
14
LICENSE
Normal file
14
LICENSE
Normal file
@@ -0,0 +1,14 @@
|
||||
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.
|
||||
51
README.md
51
README.md
@@ -1,35 +1,36 @@
|
||||
Emoji
|
||||
=====
|
||||
gemoji
|
||||
======
|
||||
|
||||
Shared Emoji assets between GitHub, Campfire, and BCX.
|
||||
Emoji images and names. See the LICENSE for copyright information.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
### Designers
|
||||
Installation
|
||||
============
|
||||
|
||||
Drop a 64x64 png into `images/` and commit it.
|
||||
Add `gemoji` to you Gemfile.
|
||||
|
||||
### Others
|
||||
``` ruby
|
||||
gem 'gemoji', :require => 'emoji/railtie'
|
||||
```
|
||||
|
||||
Rerun `rake` to rebuild static assets and sprites. (Trying to make this step unnecessary)
|
||||
|
||||
Deploying
|
||||
---------
|
||||
Example Rails Helper
|
||||
====================
|
||||
|
||||
### GitHub
|
||||
This would allow emojifying content such as: `it's raining :cats: and :dogs:!`
|
||||
|
||||
1. Run `rake emoji` in app root
|
||||
See the [Emoji cheat sheet](http://www.emoji-cheat-sheet.com) for more examples.
|
||||
|
||||
### Campfire
|
||||
|
||||
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
|
||||
|
||||
### BCX
|
||||
|
||||
1. Push changes to 37signals/emoji
|
||||
2. Run `bundle update emoji` in app root
|
||||
```ruby
|
||||
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
|
||||
```
|
||||
|
||||
32
Rakefile
32
Rakefile
@@ -1,32 +0,0 @@
|
||||
$:.unshift File.expand_path("../lib", __FILE__)
|
||||
|
||||
require 'emoji'
|
||||
require 'sprockets'
|
||||
require 'rake/clean'
|
||||
|
||||
Assets = Sprockets::Environment.new do |env|
|
||||
env.append_path Emoji.path
|
||||
env.append_path File.join(Emoji.path, 'assets')
|
||||
end
|
||||
|
||||
file "lib/emoji.png" do |f|
|
||||
Assets["emoji.png.erb"].write_to(f.name)
|
||||
end
|
||||
|
||||
file "lib/emoji.js" do |f|
|
||||
Assets["emoji.js.erb"].write_to(f.name)
|
||||
end
|
||||
|
||||
file "lib/emoji.css" do |f|
|
||||
Assets["emoji.css.erb"].write_to(f.name)
|
||||
end
|
||||
|
||||
assets = [
|
||||
"lib/emoji.png",
|
||||
"lib/emoji.js",
|
||||
"lib/emoji.css"
|
||||
]
|
||||
|
||||
assets.each { |asset| CLOBBER.include(asset) }
|
||||
|
||||
task :default => [:clobber] + assets
|
||||
@@ -1,14 +0,0 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "emoji"
|
||||
s.version = "0.3.3"
|
||||
s.summary = "Emoji Assets"
|
||||
s.description = "Shared Emoji assets between GitHub, Campfire, and BCX."
|
||||
|
||||
s.authors = ["GitHub", "37signals"]
|
||||
s.email = "support@github.com"
|
||||
s.homepage = "https://github.com/github/emoji"
|
||||
|
||||
s.files = `git ls-files`.split("\n")
|
||||
|
||||
s.add_development_dependency "sprockets", "~> 2.0"
|
||||
end
|
||||
12
gemoji.gemspec
Normal file
12
gemoji.gemspec
Normal file
@@ -0,0 +1,12 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "gemoji"
|
||||
s.version = "1.1.2"
|
||||
s.summary = "Emoji Assets"
|
||||
s.description = "Emoji assets"
|
||||
|
||||
s.authors = ["GitHub"]
|
||||
s.email = "support@github.com"
|
||||
s.homepage = "https://github.com/github/gemoji"
|
||||
|
||||
s.files = Dir["README.md", "images/**/*.png", "lib/**/*.rb", "lib/tasks/*.rake"]
|
||||
end
|
||||
1
images/emoji/anguished.png
Symbolic link
1
images/emoji/anguished.png
Symbolic link
@@ -0,0 +1 @@
|
||||
unicode/1f627.png
|
||||
1
images/emoji/black_square_button.png
Symbolic link
1
images/emoji/black_square_button.png
Symbolic link
@@ -0,0 +1 @@
|
||||
unicode/1f532.png
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user