[ANN] Ruport 0.2.2 Released: Cleanup, Modules, and MORE!

G

Gregory Brown

Quick Update
---------------------------------------------------------------------------=
------------
Ruport Oh Deuce Deuce :
The 'I Should Have Read Chapter 9 of the Pickaxe Earlier' Edition

Updates: I've stuffed everything into modules, fixed a ton of
semantic errors, fixed a few bugs, updated examples to work with the
new system (moved em to FRS), formatted
the code better and blah blah blah.

Reasons to download:

1) You can now use ruport without it crushing skulls all over your namespac=
e.
2) If the concept of a Mock really being a Fake was paining you,
you'll love FakeDB
3) The older versions are now incompatible
(if you're using ruportlib rather than the framework)
4) To feed my already inflated ego ;)

Okay... onto that actual release part:

What is Ruport?
---------------------------------------------------------------------------=
-----------
Ruby Reports (Ruport) is a pure Ruby Report Generation framework.
Though it's currently in alpha stages, it's already useful for
generating CSVs, talking to SQL servers via a simple DSL, mailing
reports, and doing custom formatting via ERb templates. It also cleans
gutters on houses, if you ask nice.


Example:
---------------------------------------------------------------------------=
-----------

---code----

@report_name =3D "Sample CSV"

query(fetch { from :address_book } ) do
|data| @report << data.to_csv
end

@mailer.recipients =3D %w[ (e-mail address removed) (e-mail address removed) ]

@mailer.body =3D "Worked Great!\n --- \n#{@report}"


---- /code -----

With a single YAML file handling config, the above will send an email
entitled Sample CSV to myself and (e-mail address removed) with the contents
"Worked Great!" followed by the inline CSV results from what gets
evaluated as SELECT * from address_book (which would be run against
whatever database you specified in your YAML file)

That's really all there is to it. No strings attached :)


Getting Started
---------------------------------------------------------------------------=
-----------

Ruport can do a lot more than this. For a full set of examples and a
walk through manual.
see: http://rubyforge.org/frs/?group_id=3D856&release_id=3D3481

(Now you can grab gzipp'd and b'zipped balls o' tar, too ;) )

Also, the API documentation lives at http://rubyforge.org/docs/

This will bring you through installation as well as a number of
different features of the system.

Ruport is a gem, so just fire off a:

sudo gem install ruport

on *nix

or a

gem install ruport on windows

and you'll be ready to go.

You can also download packages directly in a number of formats here:
http://rubyforge.org/frs/?group_id=3D856&release_id=3D3482

I have also set up a tutorial for setting up Ruport on Windows with MySQL:
For anyone interested in installing ruby-dbi with MySQL on windows,
this tutorial will get you there, whether or not you plan on using
ruport (installing ruport is the last step):

http://stonecode.org:2501/stonecodeproductions/published/Ruport,+MySQL+an=
d+Windows

NOTE: You'll need to install ruby-dbi and the driver that matches
your database in order for ruport to work.

Looking forward to some feedback... Hope you like it!

Check out the RubyForge page for more info, and feel free to contact
me if you need help.

http://ruport.rubyforge.org

Enjoy!

-Greg
 
G

GJB

There are couple of minor errors in your "Ruport, MySQL and Windows"
directions:

1. In Step 4, the config command should be: "ruby setup.rb config
-with=dbi,dbd_mysql". Note the space between config and --with.

2. In Step 5, you forgot " require 'DBI' ".

3. In Step 6, "gem install ruport ruport -v" should be two separate
commands not one.


I got the following error on executing "ruport templates/test.rb":

c:/tools/ruby/lib/ruby/gems/1.8/gems/ruport-0.2.2/lib/ruport/report/engine.rb:116:in
`eval_report': c:/tools/ruby/lib/ruby/site_ruby
/1.8/dbi/dbi.rb:510:in `parse_url': Invalid Data Source Name
(DBI::InterfaceError)
from c:/tools/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:391:in
`_get_full_driver'
from c:/tools/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in
`connect'
from
c:/tools/ruby/lib/ruby/gems/1.8/gems/ruport-0.2.2/lib/ruport/report/engine.rb:101:in
`query'
from (eval):1:in `eval_report'
from
c:/tools/ruby/lib/ruby/gems/1.8/gems/ruport-0.2.2/bin/ruport:103:in
`eval'
from
c:/tools/ruby/lib/ruby/gems/1.8/gems/ruport-0.2.2/lib/ruport/report/engine.rb:116:in
`eval_report'
from
c:/tools/ruby/lib/ruby/gems/1.8/gems/ruport-0.2.2/bin/ruport:103
from c:/Tools/ruby/bin/ruport:19:in `load'
from c:/Tools/ruby/bin/ruport:19

I am using ruby 1.8.2 on Windows XP Pro
 
G

Gregory Brown

There are couple of minor errors in your "Ruport, MySQL and Windows"
directions:

1. In Step 4, the config command should be: "ruby setup.rb config
-with=3Ddbi,dbd_mysql". Note the space between config and --with.

2. In Step 5, you forgot " require 'DBI' ".

3. In Step 6, "gem install ruport ruport -v" should be two separate
commands not one.

Thanks. I'll fix these errors just as soon as I round out the next
set of hacks on Ruport.
(I'm at the office right now, implementing DataSet#diff ). I'll fix
these before I leave tonight.
I got the following error on executing "ruport templates/test.rb":

c:/tools/ruby/lib/ruby/gems/1.8/gems/ruport-0.2.2/lib/ruport/report/engin= e.rb:116:in
`eval_report': c:/tools/ruby/lib/ruby/site_ruby
/1.8/dbi/dbi.rb:510:in `parse_url': Invalid Data Source Name

Sounds like you didn't set up config/ruport.yaml or that something is
wrong with it.
You can put it up on the list or email it to me and I can take a look at it=
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top