summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-20 18:30:01 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-20 18:30:01 +0000
commit60c3e841ce4f0bb29917bff6318167f5b417c426 (patch)
tree9499fcf26a2bc284a7b946545ad2772b868c833c
parentc0090a3ff50802d796ec36f49ade1bb4fdd4d190 (diff)
parent9afd04842f6658dcd1dc02cda17247c321ff6a67 (diff)
downloadgitlab-ce-60c3e841ce4f0bb29917bff6318167f5b417c426.tar.gz
Merge branch 'gitlab_emoji_gem' into 'master'
Replace gemoji with open source PhantomOpenEmoji
-rw-r--r--CHANGELOG1
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock7
-rw-r--r--app/models/note.rb6
-rw-r--r--app/views/layouts/_init_auto_complete.html.haml2
-rw-r--r--app/views/projects/notes/_note.html.haml2
-rw-r--r--config/initializers/gemoji.rb3
-rw-r--r--lib/gitlab/markdown.rb2
8 files changed, 14 insertions, 11 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a9a8c00666d..f2124408b42 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -29,6 +29,7 @@ v 6.7.0
- Better API responses for access_levels (sponsored by O'Reilly Media)
- Requires at least 2 unicorn workers
- Requires gitlab-shell v1.9+
+ - Replaced gemoji(due to closed licencing problem) with Phantom Open Emoji library(combined SIL Open Font License, MIT License and the CC 3.0 License)
v 6.6.5
- Added option to remove issue assignee on project issue page and issue edit page (Jason Blanchard)
diff --git a/Gemfile b/Gemfile
index 63f5e6d057c..5b58ce443ae 100644
--- a/Gemfile
+++ b/Gemfile
@@ -165,7 +165,7 @@ gem "modernizr", "2.6.2"
gem "raphael-rails", "~> 2.1.2"
gem 'bootstrap-sass', '~> 3.0'
gem "font-awesome-rails", '~> 3.2'
-gem "gemoji", "~> 1.3.0"
+gem "gitlab_emoji", "~> 0.0.1.1"
gem "gon", '~> 5.0.0'
gem 'nprogress-rails'
diff --git a/Gemfile.lock b/Gemfile.lock
index 46540fc7b03..167fd960ff5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -128,6 +128,8 @@ GEM
mail (~> 2.2)
email_validator (1.4.0)
activemodel
+ emoji (1.0.1)
+ json
enumerize (0.7.0)
activesupport (>= 3.2)
equalizer (0.0.8)
@@ -165,7 +167,6 @@ GEM
formatador (0.2.4)
gemnasium-gitlab-service (0.2.1)
rugged (~> 0.19)
- gemoji (1.3.1)
gherkin-ruby (0.3.1)
racc
github-markdown (0.5.5)
@@ -190,6 +191,8 @@ GEM
charlock_holmes (~> 0.6.6)
escape_utils (~> 0.2.4)
mime-types (~> 1.19)
+ gitlab_emoji (0.0.1.1)
+ emoji (~> 1.0.1)
gitlab_git (5.7.1)
activesupport (~> 4.0.0)
charlock_holmes (~> 0.6.9)
@@ -593,12 +596,12 @@ DEPENDENCIES
font-awesome-rails (~> 3.2)
foreman
gemnasium-gitlab-service (~> 0.2)
- gemoji (~> 1.3.0)
github-markup (~> 0.7.4)!
gitlab-flowdock-git-hook (~> 0.4.2)
gitlab-gollum-lib (~> 1.1.0)
gitlab-grack (~> 2.0.0.pre)
gitlab-linguist (~> 3.0.0)
+ gitlab_emoji (~> 0.0.1.1)
gitlab_git (~> 5.7.1)
gitlab_meta (= 6.0)
gitlab_omniauth-ldap (= 1.0.4)
diff --git a/app/models/note.rb b/app/models/note.rb
index 48c03c9d587..906de4855ab 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -199,7 +199,8 @@ class Note < ActiveRecord::Base
def downvote?
votable? && (note.start_with?('-1') ||
note.start_with?(':-1:') ||
- note.start_with?(':thumbsdown:')
+ note.start_with?(':thumbsdown:') ||
+ note.start_with?(':thumbs_down_sign:')
)
end
@@ -249,7 +250,8 @@ class Note < ActiveRecord::Base
def upvote?
votable? && (note.start_with?('+1') ||
note.start_with?(':+1:') ||
- note.start_with?(':thumbsup:')
+ note.start_with?(':thumbsup:') ||
+ note.start_with?(':thumbs_up_sign:')
)
end
diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml
index 6a20dedf62f..fd6097dcc7b 100644
--- a/app/views/layouts/_init_auto_complete.html.haml
+++ b/app/views/layouts/_init_auto_complete.html.haml
@@ -1,4 +1,4 @@
:javascript
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project)}"
- GitLab.GfmAutoComplete.Emoji.assetBase = "#{Gitlab.config.gitlab.relative_url_root + '/assets/emoji'}"
+ GitLab.GfmAutoComplete.Emoji.assetBase = "#{Gitlab.config.gitlab.relative_url_root + Emoji.asset_path}"
GitLab.GfmAutoComplete.setup();
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 217e36e38d0..81bf0611ec6 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -23,7 +23,7 @@
%i.icon-thumbs-up
\+1
- if note.downvote?
- %span.vote.downvote.label.label-error
+ %span.vote.downvote.label.label-danger
%i.icon-thumbs-down
\-1
diff --git a/config/initializers/gemoji.rb b/config/initializers/gemoji.rb
deleted file mode 100644
index 6cc33aced77..00000000000
--- a/config/initializers/gemoji.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-# Workaround for https://github.com/github/gemoji/pull/18
-require 'gemoji'
-Gitlab::Application.config.assets.paths << Emoji.images_path
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb
index e72f4f5d0ce..80bb00821f7 100644
--- a/lib/gitlab/markdown.rb
+++ b/lib/gitlab/markdown.rb
@@ -152,7 +152,7 @@ module Gitlab
#
# Returns boolean
def valid_emoji?(emoji)
- Emoji.names.include? emoji
+ Emoji.find_by_name emoji
end
# Private: Dispatches to a dedicated processing method based on reference