Hi folks,
After a silent release of Ruport 1.6.0, I'm happy to announce Ruport 1.6.1 and Murdoch 1.0.
Although 1.6.1 is just a README update, this announcement will serve as the 1.6.0 release notes as well.
Most of the changes are shifts in the internals, which will mostly be of interest to our more hardcore users, but there are some goodies for everyone. If you want to see some of the new stuff in action, the fastest way may be to take a look at this article written by Mike Milner and I:
O'Reilly Media - Technology and Business Training…
It is a bit basic but shows off some of the new features and gives a general intro to Ruport.
== Introducing Ruport's Murdoch meta-gem
Because of Ruport's rolling release schedule, it is sometimes difficult to keep up with which combinations of ruport, ruport-util and acts_as_reportable are compatible with each other. To help with this, we're now providing a meta-gem that will grab the currently supported set of these three packages.
If you're not sure exactly which parts of Ruport you want to use but want it all to be there just in case, all you need to do is install this gem:
gem install murdoch
Then, in your reports:
require "ruport/murdoch"
You can be sure that when you do this, you'll get packages that don't conflict with each other. You can also of course use gem locking, as needed. This will hopefully provide an easy way for people to grab our stable packages all in one fell swoop.
If you want more fine grain control, there is no need to use this gem, you can continue doing things as you have been.
However, if you plan on using Murdoch, here's how the versioning scheme will work:
(a+k).b.c : Changes to core ruport have been made, possible API breakage a.(b+k).c : Changes to our support libs (AAR / ruport-util) have been made, possibel API breakage a.b.(c+k) : A bug fix release, no *external* API changes present
Of course, these are just to give you a sense of what's changed at the
glance, always check the relevant release notes.
== Ruport 1.6 Changes ==
# API Changes
- Ruport::Renderer has been renamed Ruport::Controller. This will break most code, but is trivial to fix.
- The formatting helper render_data_by_row has been removed. Users will need to explicitly call row renderers or create their own helpers for this.
- Table#rename_columns() no longer creates an error when you attempt to rename a column that is not present in the table
# New Features
- Much faster CSV, Text, and HTML output
- Table#pivot() for grouping summaries based on the pivot operation
- A new 'finalize' hook in formatters that will be called after all other stages have been processed.
We've made use of this in our built in formatters so having to needlessly call render_pdf is a thing of the past. (See Ruport::Formatter::PDF#finalize for an example)
- Anonymous formatters for lazy bastards:
class BookReport < Ruport::Controller
stage :list
def setup self.data = Book.report_table(:all) end
formatter :html do build :list do output << textile("h3. Book List") output << data.to_html end end
formatter :pdf do build :list do pad(10) { add_text "Book List" } draw_table data end end
formatter :csv do build :list do output << data.to_csv end end
end
== Aknowledgements
During our work on Ruport 1.6, we've picked up two developers, Ryan Platte and Brian Candler. They were the ones who did most of the cool stuff here, so please direct your mad propz to them.
== Shameless Plug
The Ruport Book is now updated to cover Ruport 1.6. You can browse the HTML version for free at:
If you like what you see and/or want to support the project, consider purchasing a PDF or print copy:http://www.lulu.com/content/1700117
Users who purchase either are entitled to unlimited PDF updates with proof of purchase. There is no need to buy both the PDF and the Print version.
25% of revenue goes to a charity we think is really cool: Engineers Without Borders, USA (http://ewb-usa.org).