2011-02-03 01:48:27 -05:00
|
|
|
# Copyright (c) 2010-2011 Michael Dvorkin
|
2010-04-03 00:43:46 -04:00
|
|
|
#
|
|
|
|
# Awesome Print is freely distributable under the terms of MIT license.
|
|
|
|
# See LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
|
|
|
#------------------------------------------------------------------------------
|
2011-05-13 17:42:04 -04:00
|
|
|
#
|
|
|
|
# AwesomePrint might be loaded implicitly through ~/.irbrc so do nothing
|
|
|
|
# for subsequent requires.
|
|
|
|
#
|
|
|
|
unless defined?(AwesomePrint)
|
|
|
|
%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}"
|
2011-05-13 17:42:04 -04:00
|
|
|
end
|
2010-04-22 00:57:21 -04:00
|
|
|
|
2011-05-13 19:37:24 -04:00
|
|
|
require File.dirname(__FILE__) + "/awesome_print/inspector"
|
|
|
|
require File.dirname(__FILE__) + "/awesome_print/formatter"
|
|
|
|
require File.dirname(__FILE__) + "/awesome_print/core_ext/logger" if defined?(Logger)
|
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/action_view" if defined?(ActionView)
|
2011-02-03 01:19:05 -05:00
|
|
|
|
2011-05-13 17:42:04 -04:00
|
|
|
# Load the following under normal circumstatnces as well as in Rails
|
|
|
|
# console when required from ~/.irbrc.
|
2011-05-13 19:37:24 -04:00
|
|
|
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'])
|
|
|
|
require File.dirname(__FILE__) + "/awesome_print/ext/mongo_mapper" if defined?(MongoMapper)
|
2011-05-13 17:42:04 -04:00
|
|
|
end
|