2011-02-03 01:48:27 -05:00
|
|
|
# Copyright (c) 2010-2011 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
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# This is the copy of original 'ap.rb' file that matches the gem name. It makes
|
|
|
|
# it possible to omit the :require part in bundler's Gemfile:
|
|
|
|
#
|
|
|
|
# gem 'awesome_print', '>= 0.2.1', :require => 'ap'
|
|
|
|
# gem 'awesome_print', '>= 3.0.0'
|
|
|
|
#
|
2010-11-13 12:24:26 -05:00
|
|
|
%w(array string method object class kernel).each do |file|
|
|
|
|
require File.dirname(__FILE__) + "/ap/core_ext/#{file}"
|
|
|
|
end
|
2010-11-08 22:24:07 -05:00
|
|
|
|
2010-11-13 12:24:26 -05:00
|
|
|
require File.dirname(__FILE__) + "/ap/awesome_print"
|
2011-02-03 01:19:05 -05:00
|
|
|
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(Logger)
|
|
|
|
require File.dirname(__FILE__) + "/ap/mixin/action_view" if defined?(ActionView)
|
|
|
|
|
|
|
|
# Load the following under normal circumstatnces as well as in Rails
|
|
|
|
# console when required from ~/.irbrc.
|
|
|
|
require File.dirname(__FILE__) + "/ap/mixin/active_record" if defined?(ActiveRecord) || (defined?(IRB) && ENV['RAILS_ENV'])
|
|
|
|
require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(ActiveSupport) || (defined?(IRB) && ENV['RAILS_ENV'])
|
2011-03-28 20:56:06 -04:00
|
|
|
require File.dirname(__FILE__) + "/ap/mixin/mongo_mapper" if defined?(MongoMapper)
|