Compare commits

...

11 Commits

Author SHA1 Message Date
Joshua Peek
97f5441ada Gemoji 1.0.0 2012-10-02 15:26:33 -05:00
Trevor Turk
e43f1ac171 try to give attribution where possible 2012-10-02 15:24:13 -05:00
Trevor Turk
fc275cad0a clean up readme 2012-10-02 15:17:17 -05:00
Joshua Peek
38731ced7e Stub gemoji require 2012-10-02 15:15:41 -05:00
Joshua Peek
0e3f686bbd Rename gemspec 2012-10-02 15:15:13 -05:00
Trevor Turk
bd929a9ee0 require emoji in the task 2012-10-01 16:57:41 -05:00
Trevor Turk
436209c12f require environment instead of emoji 2012-10-01 16:51:21 -05:00
Trevor Turk
24d9881f20 move rake task so we can require it in our apps 2012-10-01 16:42:43 -05:00
Trevor Turk
74372af2f8 draft new readme 2012-10-01 11:14:45 -05:00
Jamie Dihiansan
a94b90198a Update LICENSE
Added 37signals credit.
2012-10-01 10:09:40 -05:00
Joshua Peek
25da8c9323 Add copyrights 2012-10-01 10:07:18 -05:00
7 changed files with 56 additions and 48 deletions

14
LICENSE Normal file
View 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.

View File

@@ -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
```

View File

@@ -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
View 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

View File

@@ -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
View File

@@ -0,0 +1 @@
require 'emoji'

7
lib/tasks/emoji.rake Normal file
View 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