2013-09-20 00:24:38 -04:00
|
|
|
# Copyright (c) 2010-2013 Michael Dvorkin
|
2010-11-08 22:24:07 -05:00
|
|
|
#
|
|
|
|
# Awesome Print is freely distributable under the terms of MIT license.
|
|
|
|
# See LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
2012-09-05 22:41:54 -04:00
|
|
|
# AwesomePrint might be loaded implicitly through ~/.irbrc or ~/.pryrc
|
|
|
|
# so do nothing for subsequent requires.
|
2010-11-08 22:24:07 -05:00
|
|
|
#
|
2012-09-03 14:54:32 -04:00
|
|
|
unless defined?(AwesomePrint::Inspector)
|
2013-10-05 14:38:15 -04:00
|
|
|
%w(array string object class kernel).each do |file|
|
2011-05-13 19:37:24 -04:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/core_ext/#{file}"
|
2011-05-13 17:42:04 -04:00
|
|
|
end
|
2010-11-08 22:24:07 -05:00
|
|
|
|
2011-05-13 19:37:24 -04:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/inspector"
|
|
|
|
require File.dirname(__FILE__) + "/awesome_print/formatter"
|
2013-10-08 17:09:42 -04:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/plugin"
|
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)
|
2012-09-05 22:41:54 -04:00
|
|
|
#
|
2011-11-09 01:03:16 -05:00
|
|
|
# Load the following under normal circumstances as well as in Rails
|
2012-09-05 22:41:54 -04:00
|
|
|
# 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?
|
|
|
|
#
|
2011-11-29 22:58:55 -05:00
|
|
|
# Load remaining extensions.
|
2012-09-05 22:41:54 -04:00
|
|
|
#
|
2011-12-05 16:33:05 -05:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/action_view" if defined?(ActionView::Base)
|
2011-05-13 19:37:24 -04:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/mongo_mapper" if defined?(MongoMapper)
|
2011-11-09 01:03:16 -05:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/mongoid" if defined?(Mongoid)
|
2011-11-29 22:58:55 -05:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/nokogiri" if defined?(Nokogiri)
|
2012-12-27 23:41:19 -05:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/no_brainer" if defined?(NoBrainer)
|
2013-02-07 15:23:52 -05:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/ripple" if defined?(Ripple)
|
2012-10-12 06:39:30 -04:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/sequel" if defined?(Sequel)
|
2013-11-05 17:34:16 -05:00
|
|
|
# require File.dirname(__FILE__) + "/awesome_print/ext/example"
|
2011-05-13 17:42:04 -04:00
|
|
|
end
|