1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00
awesome_print/lib/awesome_print.rb

41 lines
2.1 KiB
Ruby
Raw Normal View History

# Copyright (c) 2010-2016 Michael Dvorkin and contributors
#
# Awesome Print is freely distributable under the terms of MIT license.
# See LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
#
# AwesomePrint might be loaded implicitly through ~/.irbrc or ~/.pryrc
# so do nothing for subsequent requires.
#
2012-09-03 14:54:32 -04:00
unless defined?(AwesomePrint::Inspector)
%w(array string method object class kernel).each do |file|
2011-05-13 19:37:24 -04:00
require File.dirname(__FILE__) + "/awesome_print/core_ext/#{file}"
end
2011-05-13 19:37:24 -04:00
require File.dirname(__FILE__) + "/awesome_print/inspector"
require File.dirname(__FILE__) + "/awesome_print/formatter"
2011-11-24 00:47:05 -05:00
require File.dirname(__FILE__) + "/awesome_print/version"
2011-05-13 19:37:24 -04:00
require File.dirname(__FILE__) + "/awesome_print/core_ext/logger" if defined?(Logger)
#
# Load the following under normal circumstances as well as in Rails
# console when required from ~/.irbrc or ~/.pryrc.
#
require File.dirname(__FILE__) + "/awesome_print/ext/active_record" if defined?(ActiveRecord) || AwesomePrint.rails_console?
require File.dirname(__FILE__) + "/awesome_print/ext/active_support" if defined?(ActiveSupport) || AwesomePrint.rails_console?
#
# Load remaining extensions.
#
if defined?(ActiveSupport.on_load)
ActiveSupport.on_load(:action_view) do
require File.dirname(__FILE__) + "/awesome_print/ext/action_view"
end
end
2011-05-13 19:37:24 -04:00
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)
2014-01-07 02:10:56 -05:00
require File.dirname(__FILE__) + "/awesome_print/ext/nobrainer" if defined?(NoBrainer)
require File.dirname(__FILE__) + "/awesome_print/ext/ripple" if defined?(Ripple)
require File.dirname(__FILE__) + "/awesome_print/ext/sequel" if defined?(Sequel)
2014-01-02 19:10:24 -05:00
require File.dirname(__FILE__) + "/awesome_print/ext/ostruct" if defined?(OpenStruct)
end