From 7b0cd6f465f790ed3ca2ae83d9107ed1324695ff Mon Sep 17 00:00:00 2001 From: Vincent Caron Date: Fri, 30 Jan 2015 15:03:00 +0100 Subject: [PATCH] Fix 'redcarpet' gem conflict and Markdown name clash within Redmine 2.6 --- Gemfile | 3 --- init.rb | 6 +++--- .../{markdown => redcarpet_markdown}/formatter.rb | 2 +- .../{markdown => redcarpet_markdown}/helper.rb | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 Gemfile rename lib/redmine/wiki_formatting/{markdown => redcarpet_markdown}/formatter.rb (99%) rename lib/redmine/wiki_formatting/{markdown => redcarpet_markdown}/helper.rb (98%) diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 200aa19..0000000 --- a/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gem "redcarpet" diff --git a/init.rb b/init.rb index 5eaa86f..f788e89 100644 --- a/init.rb +++ b/init.rb @@ -16,8 +16,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. require 'redmine' -require 'redmine/wiki_formatting/markdown/formatter' -require 'redmine/wiki_formatting/markdown/helper' +require 'redmine/wiki_formatting/redcarpet_markdown/formatter' +require 'redmine/wiki_formatting/redcarpet_markdown/helper' Redmine::Plugin.register :redmine_redcarpet_formatter do @@ -26,7 +26,7 @@ description 'Markdown wiki formatting by Redcarpet for Redmine' version '2.1' - wiki_format_provider 'markdown', Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::Helper + wiki_format_provider 'redcarpet_markdown', Redmine::WikiFormatting::RedcarpetMarkdown::Formatter, Redmine::WikiFormatting::RedcarpetMarkdown::Helper settings :default => { 'enable_hardwrap' => '1', diff --git a/lib/redmine/wiki_formatting/markdown/formatter.rb b/lib/redmine/wiki_formatting/redcarpet_markdown/formatter.rb similarity index 99% rename from lib/redmine/wiki_formatting/markdown/formatter.rb rename to lib/redmine/wiki_formatting/redcarpet_markdown/formatter.rb index c6273a8..e620fe5 100644 --- a/lib/redmine/wiki_formatting/markdown/formatter.rb +++ b/lib/redmine/wiki_formatting/redcarpet_markdown/formatter.rb @@ -65,7 +65,7 @@ def normal_text(text) module Redmine module WikiFormatting - module Markdown + module RedcarpetMarkdown class Formatter # include ActionView::Helpers::TagHelper diff --git a/lib/redmine/wiki_formatting/markdown/helper.rb b/lib/redmine/wiki_formatting/redcarpet_markdown/helper.rb similarity index 98% rename from lib/redmine/wiki_formatting/markdown/helper.rb rename to lib/redmine/wiki_formatting/redcarpet_markdown/helper.rb index d7c57d4..06be154 100644 --- a/lib/redmine/wiki_formatting/markdown/helper.rb +++ b/lib/redmine/wiki_formatting/redcarpet_markdown/helper.rb @@ -20,7 +20,7 @@ module Redmine module WikiFormatting - module Markdown + module RedcarpetMarkdown module Helper unloadable