diff --git a/.gitignore b/.gitignore index 03736d5b..3f798c97 100644 --- a/.gitignore +++ b/.gitignore @@ -19,10 +19,9 @@ coverage/ /public/assets /public/system -/public/images/emoji # damn vim backup files *~ # every fucking time, dolphin -.directory +.directory \ No newline at end of file diff --git a/Gemfile b/Gemfile index 165cde69..ecfc613b 100644 --- a/Gemfile +++ b/Gemfile @@ -34,10 +34,6 @@ gem 'rails-assets-growl' gem "paperclip", "~> 4.2" gem 'delayed_paperclip' -# x--DD -gem 'gemoji' -gem 'rumoji' - gem 'ruby-progressbar' gem 'rails_admin' diff --git a/Gemfile.lock b/Gemfile.lock index 03597725..9e09452c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,7 +118,6 @@ GEM foreman (0.76.0) dotenv (~> 1.0.2) thor (~> 0.19.1) - gemoji (2.1.0) haml (4.0.6) tilt hashie (3.3.2) @@ -255,7 +254,6 @@ GEM rspec-support (~> 3.0.0) rspec-support (3.0.4) ruby-progressbar (1.7.0) - rumoji (0.4.0) safe_yaml (1.0.4) sanitize (3.1.0) crass (~> 1.0.1) @@ -364,7 +362,6 @@ DEPENDENCIES font-awesome-rails (~> 4.2.0.0) font-kit-rails foreman - gemoji haml http_accept_language jbuilder (~> 2.2.4) @@ -385,7 +382,6 @@ DEPENDENCIES redis rspec-rails (~> 3.0.0) ruby-progressbar - rumoji sanitize sass-rails (~> 4.0.3) sdoc (~> 0.4.1) diff --git a/Rakefile b/Rakefile index 8f67146a..9c92daf4 100644 --- a/Rakefile +++ b/Rakefile @@ -2,7 +2,6 @@ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) -load 'tasks/emoji.rake' Rails.application.load_tasks diff --git a/app/helpers/emoji_helper.rb b/app/helpers/emoji_helper.rb deleted file mode 100644 index 044d6b71..00000000 --- a/app/helpers/emoji_helper.rb +++ /dev/null @@ -1,12 +0,0 @@ -module EmojiHelper - - def emojify(content, size = 20) - Rumoji::encode(h(content).to_str).gsub(/:([\w+-]+):/) do |match| - if emoji = Emoji.find_by_alias($1) - %(#$1) - else - match - end - end.html_safe if content.present? - end -end \ No newline at end of file diff --git a/app/helpers/markdown_helper.rb b/app/helpers/markdown_helper.rb index 8a3e80b5..8d69fa7c 100644 --- a/app/helpers/markdown_helper.rb +++ b/app/helpers/markdown_helper.rb @@ -1,7 +1,5 @@ module MarkdownHelper - include EmojiHelper - def markdown(content) md = Redcarpet::Markdown.new(FlavoredMarkdown, filter_html: true, @@ -18,6 +16,6 @@ module MarkdownHelper disable_indented_code_blocks: true, strikethrough: true, superscript: false) - emojify Sanitize.fragment(md.render(content), EVIL_TAGS).html_safe + Sanitize.fragment(md.render(content), EVIL_TAGS).html_safe end end \ No newline at end of file diff --git a/app/views/inbox/_entry.html.haml b/app/views/inbox/_entry.html.haml index a3089eae..fb65cce2 100644 --- a/app/views/inbox/_entry.html.haml +++ b/app/views/inbox/_entry.html.haml @@ -15,7 +15,7 @@ ยท %a{href: show_user_question_path(i.question.user.screen_name, i.question.id)} #{i.question.answer_count} response(s) - %p.answerbox--question-text= emojify i.question.content, 16 + %p.answerbox--question-text= i.question.content .panel-body %textarea.form-control{name: 'ib-answer', placeholder: 'Write your answer here...', data: { id: i.id }} %br/ diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index e4c239ef..fc24adae 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -21,7 +21,7 @@ %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} #{a.question.answer_count} answers %p.answerbox--question-text - = emojify a.question.content, 16 + = a.question.content .panel-body - if @display_all.nil? = markdown a.content[0..255]