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

Updated README and CHANGELOG

This commit is contained in:
Mike Dvorkin 2011-12-20 20:04:07 -08:00
parent a2b9369767
commit 9046eccf4f
2 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,10 @@
1.0.2
- Added formatting of Mongoid documents (Adam Doppelt)
- ActiveRecord objects display attributes only. Use :raw => true to display the entire object
- ActiveSupport::Date objects get formatted as regular Date
- Rails.logger.ap colorizes output based on ActiveSupport::LogSubscriber.colorize_logging (default is true)
- Improved formatting of methods array
1.0.1
- Updated repo tags for Rubygems.org

View file

@ -229,7 +229,7 @@ Supported color names:
### IRB integration ###
To use awesome_print as default formatter in irb and Rails console add the following
lines into your ~/.irbrc file:
code to your ~/.irbrc file:
require "rubygems"
require "awesome_print"
@ -248,6 +248,15 @@ lines into your ~/.irbrc file:
end.new
end
### PRY integration ###
If you miss awesome_print's way of formatting output, here's how you can use it in place
of the formatting which comes with pry. Add the following code to your ~/.pryrc:
require "rubygems"
require "awesome_print"
Pry.print = proc { |output, value| output.puts value.ai }
### Logger Convenience Method ###
awesome_print adds the 'ap' method to the Logger and ActiveSupport::BufferedLogger classes
letting you call:
@ -266,7 +275,8 @@ in the custom defaults (see below). You can also override on a per call basis wi
awesome_print adds the 'ap' method to the ActionView::Base class making it available
within Rails templates. For example:
<%= ap @accounts.first %>
<%= ap @accounts.first %> # ERB
!= ap @accounts.first # HAML
With other web frameworks (ex: in Sinatra templates) you can explicitly request HTML
formatting: