Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Nov 29, 2015
2 parents 7e9debe + 23a134b commit 523786d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ gem 'rack'
gem 'sprockets'
gem 'hikidoc'
gem 'fastimage'
gem 'gemoji'
gem 'emot'
gem 'mail'

group :development do
Expand Down
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ GEM
docile (1.1.5)
domain_name (0.5.25)
unf (>= 0.0.5, < 1.0.0)
emot (0.0.4)
thor
fastimage (1.8.0)
addressable (~> 2.3, >= 2.3.5)
ffi (1.9.10)
gemoji (2.1.0)
hikidoc (0.1.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
Expand Down Expand Up @@ -116,8 +117,8 @@ PLATFORMS
DEPENDENCIES
capybara
coveralls (~> 0.7.12)
emot
fastimage
gemoji
hikidoc
jasmine
launchy
Expand Down
6 changes: 3 additions & 3 deletions lib/tdiary/core_ext.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

require 'gemoji'
require 'emot'

module TDiary
module RequestExtension
Expand Down Expand Up @@ -44,8 +44,8 @@ def emojify
emoji_url = %Q[<img src='http://www.emoji-cheat-sheet.com/graphics/emojis/%s.png' width='20' height='20' title='%s' alt='%s' class='emoji' />]
if emoji_alias == 'plus1' or emoji_alias == '+1'
emoji_url % (['plus1']*3)
elsif emoji = Emoji.find_by_alias(emoji_alias)
emoji_url % ([CGI.escape(emoji.name)]*3)
elsif Emot.unicode(emoji_alias)
emoji_url % ([CGI.escape(emoji_alias)]*3)
else
match
end
Expand Down
2 changes: 1 addition & 1 deletion spec/core/core_ext_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
context "thumbsupでもemojify" do
before { @result = "いいね!:thumbsup:".emojify }
it do
expect(@result).to eq "いいね!<img src='http://www.emoji-cheat-sheet.com/graphics/emojis/%2B1.png' width='20' height='20' title='%2B1' alt='%2B1' class='emoji' />"
expect(@result).to eq "いいね!<img src='http://www.emoji-cheat-sheet.com/graphics/emojis/thumbsup.png' width='20' height='20' title='thumbsup' alt='thumbsup' class='emoji' />"
end
end

Expand Down

0 comments on commit 523786d

Please sign in to comment.