From 262f902d9afd4c7ec13124141312726d68f5ca79 Mon Sep 17 00:00:00 2001 From: Connor Shea <connor.james.shea@gmail.com> Date: Thu, 23 Jun 2016 09:21:35 -0600 Subject: [PATCH] Restrict hamlit version, remove coffeescript filters. --- CHANGELOG | 2 +- Gemfile | 3 +-- Gemfile.lock | 2 +- config/initializers/hamlit.rb | 3 +++ doc/development/gotchas.md | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e5be7e6711f..4fd0146b917 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.0 (unreleased) - - Replace HAML with Hamlit to make view rendering faster. !3666 + - Replace Haml with Hamlit to make view rendering faster. !3666 - Wrap code blocks on Activies and Todos page. !4783 (winniehell) - Fix MR-auto-close text added to description. !4836 diff --git a/Gemfile b/Gemfile index ae6b917b620..bae00090fda 100644 --- a/Gemfile +++ b/Gemfile @@ -76,7 +76,7 @@ gem 'rack-cors', '~> 0.4.0', require: 'rack/cors' gem "kaminari", "~> 0.17.0" # HAML -gem "hamlit" +gem 'hamlit', '~> 2.5' # Files attachments gem "carrierwave", '~> 0.10.0' @@ -344,6 +344,5 @@ gem 'oauth2', '~> 1.0.0' # Soft deletion gem "paranoia", "~> 2.0" - # Health check gem 'health_check', '~> 1.5.1' diff --git a/Gemfile.lock b/Gemfile.lock index 02c7b75aba3..98a20d4e715 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -874,7 +874,7 @@ DEPENDENCIES gon (~> 6.0.1) grape (~> 0.13.0) grape-entity (~> 0.4.2) - hamlit + hamlit (~> 2.5) health_check (~> 1.5.1) hipchat (~> 1.5.0) html-pipeline (~> 1.11.0) diff --git a/config/initializers/hamlit.rb b/config/initializers/hamlit.rb index 259d562e586..7b545d8c06c 100644 --- a/config/initializers/hamlit.rb +++ b/config/initializers/hamlit.rb @@ -13,3 +13,6 @@ ActionView::Template.register_template_handler( :haml, Hamlit::TemplateHandler.new, ) + +Hamlit::Filters.remove_filter('coffee') +Hamlit::Filters.remove_filter('coffeescript') diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md index 21078c8d6f9..9d7fe7440d2 100644 --- a/doc/development/gotchas.md +++ b/doc/development/gotchas.md @@ -46,7 +46,7 @@ Rubocop](https://gitlab.com/gitlab-org/gitlab-ce/blob/8-4-stable/.rubocop.yml#L9 Using the inline `:coffee` or `:coffeescript` Haml filters comes with a performance overhead. -_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/config/initializers/haml.rb) +_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/hamlit.rb) in an initializer._ ### Further reading -- GitLab