Commit 85e3b25c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'new-emoji' into 'master'

Update html-pipeline and emoji

See merge request !1680
parents f186b20c ccc2c6e7
...@@ -52,6 +52,8 @@ v 7.9.0 (unreleased) ...@@ -52,6 +52,8 @@ v 7.9.0 (unreleased)
- Starred projects page at dashboard - Starred projects page at dashboard
- Make email display name configurable - Make email display name configurable
- Improve json validation in hook data - Improve json validation in hook data
- Use Emoji One
v 7.8.4 v 7.8.4
- Fix issue_tracker_id substitution in custom issue trackers - Fix issue_tracker_id substitution in custom issue trackers
- Fix path and name duplication in namespaces - Fix path and name duplication in namespaces
......
...@@ -88,7 +88,7 @@ gem "six" ...@@ -88,7 +88,7 @@ gem "six"
gem "seed-fu" gem "seed-fu"
# Markup pipeline for GitLab # Markup pipeline for GitLab
gem 'html-pipeline-gitlab', '~> 0.1.0' gem 'html-pipeline-gitlab', '~> 0.1'
# Markdown to HTML # Markdown to HTML
gem "github-markup" gem "github-markup"
...@@ -194,7 +194,7 @@ gem "jquery-scrollto-rails" ...@@ -194,7 +194,7 @@ gem "jquery-scrollto-rails"
gem "raphael-rails", "~> 2.1.2" gem "raphael-rails", "~> 2.1.2"
gem 'bootstrap-sass', '~> 3.0' gem 'bootstrap-sass', '~> 3.0'
gem "font-awesome-rails", '~> 4.2' gem "font-awesome-rails", '~> 4.2'
gem "gitlab_emoji", "~> 0.0.1.1" gem "gitlab_emoji", "~> 0.1"
gem "gon", '~> 5.0.0' gem "gon", '~> 5.0.0'
gem 'nprogress-rails' gem 'nprogress-rails'
gem 'request_store' gem 'request_store'
......
...@@ -144,8 +144,6 @@ GEM ...@@ -144,8 +144,6 @@ GEM
email_spec (1.5.0) email_spec (1.5.0)
launchy (~> 2.1) launchy (~> 2.1)
mail (~> 2.2) mail (~> 2.2)
emoji (1.0.1)
json
enumerize (0.7.0) enumerize (0.7.0)
activesupport (>= 3.2) activesupport (>= 3.2)
equalizer (0.0.8) equalizer (0.0.8)
...@@ -193,6 +191,8 @@ GEM ...@@ -193,6 +191,8 @@ GEM
formatador (0.2.4) formatador (0.2.4)
gemnasium-gitlab-service (0.2.5) gemnasium-gitlab-service (0.2.5)
rugged (~> 0.21) rugged (~> 0.21)
gemojione (2.0.0)
json
gherkin-ruby (0.3.1) gherkin-ruby (0.3.1)
racc racc
github-markup (1.3.1) github-markup (1.3.1)
...@@ -211,8 +211,8 @@ GEM ...@@ -211,8 +211,8 @@ GEM
charlock_holmes (~> 0.6.6) charlock_holmes (~> 0.6.6)
escape_utils (~> 0.2.4) escape_utils (~> 0.2.4)
mime-types (~> 1.19) mime-types (~> 1.19)
gitlab_emoji (0.0.1.1) gitlab_emoji (0.1.0)
emoji (~> 1.0.1) gemojione (~> 2.0)
gitlab_git (7.1.0) gitlab_git (7.1.0)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.6) charlock_holmes (~> 0.6)
...@@ -278,10 +278,11 @@ GEM ...@@ -278,10 +278,11 @@ GEM
html-pipeline (1.11.0) html-pipeline (1.11.0)
activesupport (>= 2) activesupport (>= 2)
nokogiri (~> 1.4) nokogiri (~> 1.4)
html-pipeline-gitlab (0.1.5) html-pipeline-gitlab (0.2.0)
actionpack (~> 4) actionpack (~> 4)
gitlab_emoji (~> 0.0.1) gitlab_emoji (~> 0.1)
html-pipeline (~> 1.11.0) html-pipeline (~> 1.11.0)
mime-types
sanitize (~> 2.1) sanitize (~> 2.1)
http_parser.rb (0.5.3) http_parser.rb (0.5.3)
httparty (0.13.0) httparty (0.13.0)
...@@ -707,7 +708,7 @@ DEPENDENCIES ...@@ -707,7 +708,7 @@ DEPENDENCIES
gitlab-flowdock-git-hook (~> 0.4.2) gitlab-flowdock-git-hook (~> 0.4.2)
gitlab-grack (~> 2.0.0.rc2) gitlab-grack (~> 2.0.0.rc2)
gitlab-linguist (~> 3.0.1) gitlab-linguist (~> 3.0.1)
gitlab_emoji (~> 0.0.1.1) gitlab_emoji (~> 0.1)
gitlab_git (= 7.1.0) gitlab_git (= 7.1.0)
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (= 1.2.0) gitlab_omniauth-ldap (= 1.2.0)
...@@ -720,7 +721,7 @@ DEPENDENCIES ...@@ -720,7 +721,7 @@ DEPENDENCIES
guard-spinach guard-spinach
haml-rails haml-rails
hipchat (~> 1.4.0) hipchat (~> 1.4.0)
html-pipeline-gitlab (~> 0.1.0) html-pipeline-gitlab (~> 0.1)
httparty httparty
jasmine (= 2.0.2) jasmine (= 2.0.2)
jquery-atwho-rails (~> 0.3.3) jquery-atwho-rails (~> 0.3.3)
......
...@@ -176,11 +176,11 @@ class ProjectsController < ApplicationController ...@@ -176,11 +176,11 @@ class ProjectsController < ApplicationController
end end
def autocomplete_emojis def autocomplete_emojis
Rails.cache.fetch("autocomplete-emoji-#{Emoji::VERSION}") do Rails.cache.fetch("autocomplete-emoji-#{Gemojione::VERSION}") do
Emoji.names.map do |e| Emoji.emojis.map do |name, emoji|
{ {
name: e, name: name,
path: view_context.image_url("emoji/#{e}.png") path: view_context.image_url("emoji/#{emoji["unicode"]}.png")
} }
end end
end end
......
...@@ -664,19 +664,19 @@ describe GitlabMarkdownHelper do ...@@ -664,19 +664,19 @@ describe GitlabMarkdownHelper do
it "should generate absolute urls for emoji" do it "should generate absolute urls for emoji" do
expect(markdown(':smile:')).to( expect(markdown(':smile:')).to(
include(%(src="#{Gitlab.config.gitlab.url}/assets/emoji/smile.png)) include(%(src="#{Gitlab.config.gitlab.url}/assets/emoji/#{Emoji.emoji_filename('smile')}.png))
) )
end end
it "should generate absolute urls for emoji if relative url is present" do it "should generate absolute urls for emoji if relative url is present" do
allow(Gitlab.config.gitlab).to receive(:url).and_return('http://localhost/gitlab/root') allow(Gitlab.config.gitlab).to receive(:url).and_return('http://localhost/gitlab/root')
expect(markdown(":smile:")).to include("src=\"http://localhost/gitlab/root/assets/emoji/smile.png") expect(markdown(":smile:")).to include("src=\"http://localhost/gitlab/root/assets/emoji/#{Emoji.emoji_filename('smile')}.png")
end end
it "should generate absolute urls for emoji if asset_host is present" do it "should generate absolute urls for emoji if asset_host is present" do
allow(Gitlab::Application.config).to receive(:asset_host).and_return("https://cdn.example.com") allow(Gitlab::Application.config).to receive(:asset_host).and_return("https://cdn.example.com")
ActionView::Base.any_instance.stub_chain(:config, :asset_host).and_return("https://cdn.example.com") ActionView::Base.any_instance.stub_chain(:config, :asset_host).and_return("https://cdn.example.com")
expect(markdown(":smile:")).to include("src=\"https://cdn.example.com/assets/emoji/smile.png") expect(markdown(":smile:")).to include("src=\"https://cdn.example.com/assets/emoji/#{Emoji.emoji_filename('smile')}.png")
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment