I have a project that I'm working on that needs to live two different lives,
and I'm not sure how to get it to do it. Of course, as Dave Thomas would
say, this is Ruby, so there's always a way :-) I just need a little help
finding it. Here's the exact problem:

I've written a unit testing framework called Lapidary, and it's made up of a
reasonable number of files in a fairly simple directory structure. Those
files have a lot of interdependencies on one another, so they need to be
able to require one another. Now, Lapidary is generally used as a library,
so it'll usually be installed in site_ruby/x.x/Lapidary/ and its parts will
be accessed in a script using:

	require 'Lapidary/TestCase'
	require 'Lapidary/UI/Console/TestRunner'

Thus the parts of Lapidary can reference each other in the same way. Fine,
no problem there: everybody's happy.

The problem comes in when you want don't want to install Lapidary as a
library, say to just look at it and run its internal unit tests. Suddenly,
Lapidary doesn't work anymore, because it can't find itself! Aach! What to
do? If it uses relative references, then it can't find its parts when run as
a library; if it uses library references, then it can't find its parts when
it's run standalone.

Probably I'm missing something obvious here; please help me out.

TIA,


Nathaniel

<:((><
+ - -						+ - -
| RoleModel Software, Inc. &		| EQUIP VI
| The XP Software Studio(TM)		|