In article <etoznsk3oyw.fsf / narsil.emschwar>,
Eric Schwartz  <emschwar / fc.hp.com> wrote:
>I'd like to extend Ruby to directly interface with STAF
>(http://staf.sf.net/), which I'm using to actually execute my tests,
>and report on their status.  STAF has a C API, and I think I
>understand how to wrap it with Ruby, but I have a few questions on
>that.

Oh, good.  I was thinking about wrapping STAF so that we could use it from 
Ruby - but I'm doing too many other things right now.  Good to see that 
someone else is working on it.

>
>Just FYI, the only reference I've found so far is the online Pickaxe;
>other pointers are welcome, so long as they are available online
>(offline refs are welcome too, but I'd like to finish this today if
>possible; it doesn't seem to be THAT hard, and I'm getting excited
>enough about Ruby that I want to start USING it, darn it!).

There's also the README.ext file that comes with the Ruby source.

>
>Also, I would like to define a few Ruby classes as well, to make
>exception handling a little easier.
>

BTW: Have you looked at using SWIG (http://www.swig.org) to wrap the STAF 
C library?  I'll bet you'll find that the following will work pretty much 
out-of-the-box with not much tweaking required:

//STAF.i
%module STAF
%{
#include "STAF.h" //I'm guessing that one exists
%}

%include "STAF.h" 


Then run: swig -ruby STAF.i

and check the resulting STAF_wrap.c and use it to build the extension.

Phil