Merge pull request #24 from danthompson/non_rails_support

Add non rails support
This commit is contained in:
Joshua Peek
2013-01-09 13:39:39 -08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ gem 'gemoji'
**Sync images**
Images can be copied to your public directory with `rake emoji` in your Rails 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).
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).
``` ruby
# Rakefile

View File

@@ -1,8 +1,8 @@
desc "Copy emoji to the Rails `public/images/emoji` directory"
task :emoji => :environment do
task :emoji do
require 'emoji'
target = "#{Rails.root}/public/images/emoji"
target = "#{Rake.original_dir}/public/images/emoji"
mkdir_p "#{target}"
Dir["#{Emoji.images_path}/emoji/*.png"].each do |src|