S
Scott Parkerson
I'm looking to write a script that examines one or more scripts
written in Ruby and programatically determine the following:
* What does each script provide? Specifically, what classes are
defined, whether they are in a module namespace, etc.
* What does the script require to operate (i.e. dependencies on other
Ruby scripts)
I need this because I am looking into writing Ruby support into the
Conary packaging system (c.f. http://wiki.rpath.com/wiki/Conary).
Conary already automatically generates provides/requires information
when packaging scripts for other popular languages (e.g. Perl, Python,
Java), so I think that having Ruby support would be A Good Thing.
Ideally, I should be able to 100% accurately identify what the script
provides, and *mostly* identify requires for dependencies. I say
mostly because many scripts use tricks to load plugins that involve
using the module's filename and path examined at runtime. The main
thing is that there are no "false provides/requires" returned by my
script.
I would like the solution to not require examining gemspecs, or even
require gems at all.
If anyone has any ideas about how to go about doing this, please
respond here. Let's talk!
Thanks in advance,
Scott
written in Ruby and programatically determine the following:
* What does each script provide? Specifically, what classes are
defined, whether they are in a module namespace, etc.
* What does the script require to operate (i.e. dependencies on other
Ruby scripts)
I need this because I am looking into writing Ruby support into the
Conary packaging system (c.f. http://wiki.rpath.com/wiki/Conary).
Conary already automatically generates provides/requires information
when packaging scripts for other popular languages (e.g. Perl, Python,
Java), so I think that having Ruby support would be A Good Thing.
Ideally, I should be able to 100% accurately identify what the script
provides, and *mostly* identify requires for dependencies. I say
mostly because many scripts use tricks to load plugins that involve
using the module's filename and path examined at runtime. The main
thing is that there are no "false provides/requires" returned by my
script.
I would like the solution to not require examining gemspecs, or even
require gems at all.
If anyone has any ideas about how to go about doing this, please
respond here. Let's talk!
Thanks in advance,
Scott