mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Require Nokogiri plugin if the gem is present
This commit is contained in:
parent
89b8fc92ef
commit
91ac8e080d
1 changed files with 4 additions and 1 deletions
|
@ -16,12 +16,15 @@ unless defined?(AwesomePrint)
|
|||
require File.dirname(__FILE__) + "/awesome_print/formatter"
|
||||
require File.dirname(__FILE__) + "/awesome_print/version"
|
||||
require File.dirname(__FILE__) + "/awesome_print/core_ext/logger" if defined?(Logger)
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/action_view" if defined?(ActionView)
|
||||
|
||||
# Load the following under normal circumstances as well as in Rails
|
||||
# console when required from ~/.irbrc.
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/active_record" if defined?(ActiveRecord) || (defined?(IRB) && ENV['RAILS_ENV'])
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/active_support" if defined?(ActiveSupport) || (defined?(IRB) && ENV['RAILS_ENV'])
|
||||
|
||||
# Load remaining extensions.
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/action_view" if defined?(ActionView)
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/mongo_mapper" if defined?(MongoMapper)
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/mongoid" if defined?(Mongoid)
|
||||
require File.dirname(__FILE__) + "/awesome_print/ext/nokogiri" if defined?(Nokogiri)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue