From 32e76633e879d0783f0673cd20b30ad1623cfc4b Mon Sep 17 00:00:00 2001 From: Mike Dvorkin Date: Tue, 29 Nov 2011 20:26:00 -0800 Subject: [PATCH] Updated README and CHANGELOG files --- CHANGELOG | 4 ++++ README.md | 23 +++++++++++++++-------- lib/awesome_print/inspector.rb | 8 ++++---- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2474333..9b8b084 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ ?.?.? - Added ability to format *arbitrary* Ruby object - Added :limit option to limit large output for arrays and hashes (Andrew Horsman) + - Improved HTML formatting when :html => true (Daniel Johnson) + - Added Mongoid extension (Adam Doppelt) + - Added Nokogiri extension (Adam Doppelt) + - Removed Jeweler gem dependency 0.4.0 - 'ap object' now returns the object (Stephan Hagemann) diff --git a/README.md b/README.md index bec7006..ae84e35 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Awesome Print ## -Awesome Print is Ruby library that pretty prints Ruby objects in full color +Awesome Print is a Ruby library that pretty prints Ruby objects in full color exposing their internal structure with proper indentation. Rails ActiveRecord objects and usage within Rails templates are supported via included mixins. @@ -7,9 +7,6 @@ objects and usage within Rails templates are supported via included mixins. # Installing as Ruby gem $ gem install awesome_print - # Installing as Rails plugin - $ ruby script/plugin install http://github.com/michaeldv/awesome_print.git - # Cloning the repository $ git clone git://github.com/michaeldv/awesome_print.git @@ -28,19 +25,24 @@ Default options: :sort_keys => false, # Do not sort hash keys. :limit => false, # Limit large output for arrays and hashes. Set to a boolean or integer. :color => { + :args => :pale, :array => :white, - :bignum => :blue, + :bigdecimal => :blue, :class => :yellow, :date => :greenish, :falseclass => :red, :fixnum => :blue, :float => :blue, - :hash => :gray, + :hash => :pale, + :keyword => :cyan, + :method => :purpleish, :nilclass => :red, :string => :yellowish, + :struct => :pale, :symbol => :cyanish, :time => :greenish, - :trueclass => :green + :trueclass => :green, + :variable => :cyanish } Supported color names: @@ -300,12 +302,17 @@ For example: ### Contributors ### +* Adam Doppelt -- https://github.com/gurgeous * Andrew O'Brien -- https://github.com/AndrewO * Andrew Horsman -- https://github.com/basicxman +* Benoit Daloze -- http://github.com/eregon +* Brandon Zylstra -- https://github.com/brandondrew +* Daniel Johnson -- https://github.com/adhd360 * Daniel Bretoi -- http://github.com/danielb2 * Eloy Duran -- http://github.com/alloy * Elpizo Choi -- https://github.com/fuJiin -* Benoit Daloze -- http://github.com/eregon +* Greg Weber -- https://github.com/gregwebs +* Jeff Felchner -- https://github.com/jfelchner * Sean Gallagher -- http://github.com/torandu * Stephan Hagemann -- https://github.com/shageman * Tim Harper -- http://github.com/timcharper diff --git a/lib/awesome_print/inspector.rb b/lib/awesome_print/inspector.rb index 531abb2..b0ead7c 100755 --- a/lib/awesome_print/inspector.rb +++ b/lib/awesome_print/inspector.rb @@ -31,6 +31,7 @@ module AwesomePrint :sort_keys => false, # Do not sort hash keys. :limit => false, # Limit large output for arrays and hashes. Set to a boolean or integer. :color => { + :args => :pale, :array => :white, :bigdecimal => :blue, :class => :yellow, @@ -39,15 +40,14 @@ module AwesomePrint :fixnum => :blue, :float => :blue, :hash => :pale, - :struct => :pale, + :keyword => :cyan, + :method => :purpleish, :nilclass => :red, :string => :yellowish, + :struct => :pale, :symbol => :cyanish, :time => :greenish, :trueclass => :green, - :method => :purpleish, - :args => :pale, - :keyword => :cyan, :variable => :cyanish } }