README.md in pivot_table-0.1.3 vs README.md in pivot_table-0.1.4

- old
+ new

@@ -1,28 +1,23 @@ -Pivot Table [![Build Status](https://secure.travis-ci.org/edjames/pivot_table.png)](http://travis-ci.org/edjames/pivot_table) [![Code Climate](https://codeclimate.com/github/edjames/pivot_table.png)](https://codeclimate.com/github/edjames/pivot_table) -=========== +# Pivot Table [![Build Status](https://secure.travis-ci.org/edjames/pivot_table.png)](http://travis-ci.org/edjames/pivot_table) [![Code Climate](https://codeclimate.com/github/edjames/pivot_table.png)](https://codeclimate.com/github/edjames/pivot_table) + A handy tool for transforming a dataset into a spreadsheet-style pivot table. -Why make this? --------------- +### Why make this? One of the most powerful and underrated features of spreadhseet packages is their ability to create pivot tables. I'm often asked to replicate this functionality in a web application, so I decided to share. This is a simple gem for a specific job, I hope it helps. -Installation ------------- +### Installation Couldn't be easier... gem install pivot_table -There are no dependencies and pivot *should* work on any version of Ruby. +### Usage -Usage ------ - At the very least, you will need to provide three things to create a pivot table... * a dataset (this doesn't necessarily have to be an ActiveRecord dataset, but it should at least behave like ActiveRecord e.g. OpenStruct) * the method to be used as column names * the method to be used as row names @@ -41,11 +36,11 @@ data = [ obj_1, obj_2, obj_3, obj_4, obj_5, obj_6, obj_7, obj_8 ] Instantiate a new PivotTable::Grid object like this... grid = PivotTable::Grid.new do |g| - g.source_data = data + g.source_data = data g.column_name = :quarter g.row_name = :city g.value_name = :sales end @@ -106,21 +101,16 @@ g.row_totals g.rows[0].total g.rows[1].total g.grand_total -Still to come -------------- -PivotTable is still in the very early stages of development. As my personal needs for evolve, I'll update the gem with new functionality accordingly. -Feel free to fork and/or suggest new features. - -Ruby 1.9 only...for now +### Ruby Support ---------------- -Right now PivotTable only supports Ruby 1.9. If you need support for 1.8 please feel free to fork and merge. I will not however be adding -support for 1.8. +* 1.9.3 +* 2.0.0 Contributing to PivotTable --------------------- If you want to contribute: @@ -134,6 +124,6 @@ * Please try not to mess with the Rakefile, version, or history. Copyright --------- -Copyright (c) 2011 Ed James. See LICENSE for details. +Copyright (c) 2013 Ed James. See LICENSE for details.