Skip to content

Commit

Permalink
Warn about using the RedCloth 3 fallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
seancribbs committed Jun 13, 2009
1 parent fde9820 commit 006443a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -2,6 +2,7 @@


=== Edge === Edge


* Warn about using the RedCloth 3 fallback. [Sean Cribbs, Jason Garber]
* Prevent stty errors on JRuby while running bootstrap. [Sean Cribbs] * Prevent stty errors on JRuby while running bootstrap. [Sean Cribbs]
* Moved template_name to ApplicationController [Jim Gay, Michael Kessler] * Moved template_name to ApplicationController [Jim Gay, Michael Kessler]
* Remove vizres plugin. [Sean Cribbs] * Remove vizres plugin. [Sean Cribbs]
Expand Down
7 changes: 6 additions & 1 deletion lib/radiant/initializer.rb
Expand Up @@ -51,10 +51,15 @@ def library_directories
#{RADIANT_ROOT}/vendor/rack-cache/lib #{RADIANT_ROOT}/vendor/rack-cache/lib
} }
begin begin
Object.send :gem, 'RedCloth', ">=4.0.0"
require 'redcloth' require 'redcloth'
rescue LoadError rescue LoadError, Gem::LoadError
# If the gem is not available, use the packaged version # If the gem is not available, use the packaged version
libs << "#{RADIANT_ROOT}/vendor/redcloth/lib" 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 end
libs libs
end end
Expand Down

0 comments on commit 006443a

Please sign in to comment.