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:
parent
fcbd18377a
commit
934d294592
3 changed files with 9 additions and 14 deletions
|
@ -8,8 +8,7 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
require File.dirname(__FILE__) + "/ap/awesome_print"
|
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/action_view" if defined?(::ActionView)
|
||||||
require File.dirname(__FILE__) + "/ap/mixin/active_record" if defined?(::ActiveRecord)
|
require File.dirname(__FILE__) + "/ap/mixin/active_record" if defined?(::ActiveRecord)
|
||||||
require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(::ActiveSupport)
|
require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(::ActiveSupport)
|
||||||
|
|
||||||
|
|
|
@ -14,5 +14,5 @@ module AwesomePrintLogger
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Logger.send(:include, AwesomePrintLogger) if defined?(Logger)
|
Logger.send(:include, AwesomePrintLogger)
|
||||||
ActiveSupport::BufferedLogger.send(:include, AwesomePrintLogger) if defined?(::ActiveSupport::BufferedLogger)
|
ActiveSupport::BufferedLogger.send(:include, AwesomePrintLogger) if defined?(::ActiveSupport::BufferedLogger)
|
||||||
|
|
|
@ -10,16 +10,12 @@
|
||||||
# gem 'awesome_print', '>= 0.2.1', :require => 'ap'
|
# gem 'awesome_print', '>= 0.2.1', :require => 'ap'
|
||||||
# gem 'awesome_print', '>= 3.0.0'
|
# gem 'awesome_print', '>= 3.0.0'
|
||||||
#
|
#
|
||||||
require File.dirname(__FILE__) + "/ap/core_ext/array"
|
%w(array string method object class kernel).each do |file|
|
||||||
require File.dirname(__FILE__) + "/ap/core_ext/string"
|
require File.dirname(__FILE__) + "/ap/core_ext/#{file}"
|
||||||
require File.dirname(__FILE__) + "/ap/core_ext/object"
|
end
|
||||||
require File.dirname(__FILE__) + "/ap/core_ext/class"
|
|
||||||
require File.dirname(__FILE__) + "/ap/core_ext/kernel"
|
|
||||||
require File.dirname(__FILE__) + "/ap/awesome_print"
|
require File.dirname(__FILE__) + "/ap/awesome_print"
|
||||||
|
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger)
|
||||||
require File.dirname(__FILE__) + "/ap/core_ext/logger" if defined?(::Logger) or defined?(::ActiveSupport::BufferedLogger)
|
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/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)
|
require File.dirname(__FILE__) + "/ap/mixin/active_support" if defined?(::ActiveSupport)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue