diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-23 17:07:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-23 17:07:51 +0000 |
commit | a657a12450621e5ed9d0627b9a33a42d9799db3b (patch) | |
tree | da2566c514702273488e4a85cac5fbc9b0f707dc /lib | |
parent | 471e01ca5059f892888f78e2278dd41d742a4b75 (diff) | |
download | redmine-a657a12450621e5ed9d0627b9a33a42d9799db3b.tar.gz redmine-a657a12450621e5ed9d0627b9a33a42d9799db3b.zip |
Don't load redcarpet with JRuby.
git-svn-id: http://svn.redmine.org/redmine/trunk@12453 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine.rb | 11 | ||||
-rw-r--r-- | lib/redmine/scm/adapters/abstract_adapter.rb | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/redmine.rb b/lib/redmine.rb index 187689ea1..64d63dbb6 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -22,6 +22,11 @@ begin rescue LoadError # RMagick is not available end +begin + require 'Redcarpet' unless Object.const_defined?(:Redcarpet) +rescue LoadError + # Redcarpet is not available +end require 'redmine/scm/base' require 'redmine/access_control' @@ -267,8 +272,10 @@ end Redmine::WikiFormatting.map do |format| format.register :textile, Redmine::WikiFormatting::Textile::Formatter, Redmine::WikiFormatting::Textile::Helper - format.register :markdown, Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::Helper, - :label => 'Markdown (experimental)' + if Object.const_defined?(:Redcarpet) + format.register :markdown, Redmine::WikiFormatting::Markdown::Formatter, Redmine::WikiFormatting::Markdown::Helper, + :label => 'Markdown (experimental)' + end end ActionView::Template.register_template_handler :rsb, Redmine::Views::ApiTemplateHandler diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index b6b4e08c3..258b625fb 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. require 'cgi' +require 'redmine/scm/adapters' if RUBY_VERSION < '1.9' require 'iconv' |