Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97f5441ada | ||
|
|
e43f1ac171 | ||
|
|
fc275cad0a | ||
|
|
38731ced7e | ||
|
|
0e3f686bbd | ||
|
|
bd929a9ee0 | ||
|
|
436209c12f | ||
|
|
24d9881f20 | ||
|
|
74372af2f8 | ||
|
|
a94b90198a | ||
|
|
25da8c9323 |
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,37 +1,28 @@
|
||||
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.
|
||||
Install and require `gemoji` or add it to your Gemfile.
|
||||
|
||||
Deploying
|
||||
---------
|
||||
|
||||
### GitHub
|
||||
Example Rails Helper
|
||||
====================
|
||||
|
||||
1. Update `emoji` gem in Gemfile
|
||||
1. Rerun `rake emoji` in app root
|
||||
|
||||
### 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
|
||||
|
||||
Todo
|
||||
----
|
||||
|
||||
- Figure out what's wrong with the symlinks removed in 97709f
|
||||
```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
|
||||
```
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "emoji"
|
||||
s.version = "0.4.0"
|
||||
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 = Dir["README.md", "images/**/*.png", "lib/**/*"]
|
||||
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.0.0"
|
||||
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/**/*"]
|
||||
end
|
||||
@@ -16,12 +16,7 @@ module Emoji
|
||||
if defined? Rails::Engine
|
||||
class Engine < Rails::Engine
|
||||
rake_tasks do
|
||||
task :emoji do
|
||||
require 'emoji'
|
||||
Dir["#{PATH}/../images/*.png"].each do |src|
|
||||
cp src, "#{Rails.root}/public/images/emoji/"
|
||||
end
|
||||
end
|
||||
load "tasks/emoji.rake"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
1
lib/gemoji.rb
Normal file
1
lib/gemoji.rb
Normal file
@@ -0,0 +1 @@
|
||||
require 'emoji'
|
||||
7
lib/tasks/emoji.rake
Normal file
7
lib/tasks/emoji.rake
Normal file
@@ -0,0 +1,7 @@
|
||||
task :emoji => :environment do
|
||||
require 'emoji'
|
||||
|
||||
Dir["#{Emoji::PATH}/../images/*.png"].each do |src|
|
||||
cp src, "#{Rails.root}/public/images/emoji/"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user