[SoC][ANN] Ruby Reports 0.4.19 Released

G

Gregory Brown

Hi folks, I'm happy to announce the 7th Summer of Code release of Ruport.

= Ruby Reports 0.4.19 : The "Robber Baron" Edition =

== What is Ruport? ==

Ruby Reports is a library and soon-to-be framework for doing business
reporting. It provides a highly extensible formatting system, a
reporting friendly set of data structures, a very high level interface
to databases, and a common way of structuring and running your
reporting applications. It aims to integrate a number of Ruby's best
tools so that you can easily take advantage of them.

== What is new in this release? ==

We now have rudimentary support for grouping.
Though it is just a start, we're already able to do some fun stuff.

For a somewhat visual example of this, see http://pastie.caboo.se/6632

I've also cleaned up a lot of messy code with the help of JEG2, and
fixed a few bugs in Data::Table that Dudley Flanders pointed out.

There is also the load_csv method in Report, This allows you to
easily build a DataSet (our current default datastructure), a
Data::Table(the thing that I want to replace DataSet soon), or a plain
old Array. This is mostly syntactic sugar, but it's pretty nice that
if you wanted to convert a CSV to a PDF in Ruport, it'd be as easy as
this:

load_csv('data.csv').as:)pdf)

The next release will feature an invoice engine written by James
Healy, and some additional support for grouping, so please do let us
know what you think about the new features!

== Installation ==

Ruport is a gem, but if you need help with some of the dependencies
(such as DBI) or want to do a manual install, there are detailed
instructions available here: http://ruport.infogami.com/Installation

You can download it manually from Rubyforge here:
http://rubyforge.org/frs/?group_id=856

Or grab it from SVN via:
svn://rubyforge.org//var/svn/ruport/tags/rel_0_4_19

== Resources ==

[1] Wiki : http://ruport.infogami.com/
[2] Atom: http://ruport.infogami.com/blog/atom.xml
[3] Mailing List: http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org

Right now, because documentation is either outdated or transient for a
lot of the core functionality of Ruport, we encourage you to use our
more 'interactive' resources.

Almost all Ruport related news eventually makes it onto the wiki[1],
so it may be a good place to start. There is also an Atom Feed there
for Ruport's blog, which might be a good way of keeping up on the
latest news[2]. We encourage people to use the wiki actively, adding
tutorials, feature requests, reporting problems, commenting on
articles, etc.

There is also the mailing list[3] which has an archive that can help
you get up to speed on Ruport or solve a quick question. This is a
very good place to start a discussion if you are working on project
you'd like to use Ruport in, are interested in contributing code, or
need to report a problem.

Finally, there is the IRC channel, which all three of Ruport's
developers hang out on often. You can find this on freenode.
(#ruport)

There is a lot of cool new stuff in Ruport as a result of the Summer
of Code. We even have some basic functionality for you rails folks
out there. The problem is, we haven't been very good at ensuring
things get documented, especially since things are moving so fast. So
please use these resources and let us know if you're lost, confused,
or want to help :)
 
S

Suraj N. Kurapati

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gregory said:
We now have rudimentary support for grouping.
Though it is just a start, we're already able to do some fun stuff.

For a somewhat visual example of this, see http://pastie.caboo.se/6632

Here's an idea for the code in that example:

a.as_text would be easier to read and type
load_csv('data.csv').as:)pdf)

The same idea applies here:

load_csv('data.csv').as_pdf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEzkQBmV9O7RYnKMcRAoGxAJ0cwDt8uKn4OiBPhHxwsOdr23qdQwCfTUns
7O5NXBIwkpCm3lPsDaJWm0A=
=1O+3
-----END PGP SIGNATURE-----
 
G

Gregory Brown

Here's an idea for the code in that example:

a.as_text would be easier to read and type

On the DataSet class, we have things like to_csv, and to_html

Data::Table hasn't gotten these yet. I use the as() method because it
can take a block that lets you do complex formatting.

I think for Data::Table, i will method_missing it to recognize
to_plugin_name methods, so that even user created formatting plugins
are recognized.
 
S

Suraj N. Kurapati

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gregory said:
I think for Data::Table, i will method_missing it to recognize
to_plugin_name methods, so that even user created formatting plugins
are recognized.

Agreed. method_missing is certainly the best approach.

def method_missing id, *args, &blk
if id =~ /^as_(.*)$/
as $1.to_sym, *args, &blk
end
end
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEzlh7mV9O7RYnKMcRAkLLAJwLTNnij6YG9oXUtuQrvj0/vCUjewCaA54N
YPlz15Ii6wk05Ogp2arGcSI=
=n5Fd
-----END PGP SIGNATURE-----
 
G

Gregory Brown

Agreed. method_missing is certainly the best approach.

def method_missing id, *args, &blk
if id =~ /^as_(.*)$/
as $1.to_sym, *args, &blk
end
end

This implementation is fine, I just have a slightly different design in mind.
1. I'd like to keep the rubyish semantics of to_s, to_a etc if all I
am doing is a straight conversion. So i'm going to prefix these w. to
instead of as

2. I don't want these methods to take arguments or blocks, because I
want them to be dumb. This is just so people go ahead and learn the
much more powerful as() method if they actually need it.

I have added some code that does this, you can see it here.
http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/62

Thanks for the suggestion, I also cleaned up my regex after seeing your code.
 
G

Gregory Brown

Found a bug in yours and a redundancy in mine. When using
method_missing, always call super, otherwise you are going to leave a
debugging nightmare
I have added some code that does this, you can see it here.
http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/62

my send was pointless. new code here
http://stonecode.svnrepository.com/ruport/trac.cgi/changeset/63

If you have any more suggestions or ideas, I'd love to hear them on
the Ruport mailing list, especially since they'll be archived over
there and also reach a more direct audience. Seems like my host is
down right now though :-/

When it comes back up, you can find it here:
http://lists.stonecode.org/listinfo.cgi/ruport-stonecode.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top