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

Copied ap.rb to awesome_print.rb to match gem name; removed redundant logic for Logger

This commit is contained in:
Mike Dvorkin 2010-11-13 09:24:26 -08:00
parent fcbd18377a
commit 934d294592
3 changed files with 9 additions and 14 deletions

View file

@ -8,8 +8,7 @@
end
require File.dirname(__FILE__) + "/ap/awesome_print"
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger) or defined?(::ActiveSupport::BufferedLogger)
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger)
require File.dirname(__FILE__) + "/ap/mixin/action_view" if defined?(::ActionView)
require File.dirname(__FILE__) + "/ap/mixin/active_record" if defined?(::ActiveRecord)
require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(::ActiveSupport)

View file

@ -14,5 +14,5 @@ module AwesomePrintLogger
end
Logger.send(:include, AwesomePrintLogger) if defined?(Logger)
Logger.send(:include, AwesomePrintLogger)
ActiveSupport::BufferedLogger.send(:include, AwesomePrintLogger) if defined?(::ActiveSupport::BufferedLogger)

View file

@ -10,16 +10,12 @@
# gem 'awesome_print', '>= 0.2.1', :require => 'ap'
# gem 'awesome_print', '>= 3.0.0'
#
require File.dirname(__FILE__) + "/ap/core_ext/array"
require File.dirname(__FILE__) + "/ap/core_ext/string"
require File.dirname(__FILE__) + "/ap/core_ext/object"
require File.dirname(__FILE__) + "/ap/core_ext/class"
require File.dirname(__FILE__) + "/ap/core_ext/kernel"
%w(array string method object class kernel).each do |file|
require File.dirname(__FILE__) + "/ap/core_ext/#{file}"
end
require File.dirname(__FILE__) + "/ap/awesome_print"
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger) or defined?(::ActiveSupport::BufferedLogger)
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger)
require File.dirname(__FILE__) + "/ap/mixin/action_view" if defined?(::ActionView)
require File.dirname(__FILE__) + "/ap/mixin/active_record" if defined?(::ActiveRecord)
require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(::ActiveSupport)