Permalink
Browse files

Warn about using the RedCloth 3 fallback.

  • Loading branch information...
1 parent fde9820 commit 006443a8547f5ac53445840a69dea3eebe1cb5e2 @seancribbs seancribbs committed Jun 13, 2009
Showing with 7 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +6 −1 lib/radiant/initializer.rb
View
@@ -2,6 +2,7 @@
=== Edge
+* Warn about using the RedCloth 3 fallback. [Sean Cribbs, Jason Garber]
* Prevent stty errors on JRuby while running bootstrap. [Sean Cribbs]
* Moved template_name to ApplicationController [Jim Gay, Michael Kessler]
* Remove vizres plugin. [Sean Cribbs]
@@ -51,10 +51,15 @@ def library_directories
#{RADIANT_ROOT}/vendor/rack-cache/lib
}
begin
+ Object.send :gem, 'RedCloth', ">=4.0.0"
require 'redcloth'
- rescue LoadError
+ rescue LoadError, Gem::LoadError
# If the gem is not available, use the packaged version
libs << "#{RADIANT_ROOT}/vendor/redcloth/lib"
+ after_initialize do
+ warn "RedCloth > 4.0 not found. Falling back to RedCloth 3.0.4 (2005-09-15). You should run `gem install RedCloth`."
+ require 'redcloth'
+ end
end
libs
end

0 comments on commit 006443a

Please sign in to comment.