Tim Ferrell wrote:
> On 8/30/2005 7:31:09 PM, "Trans" wrote:
> >If I am not mistaken, setup.rb essentially defines the common sructure
> >for a Ruby project. And is the general layout adopted by Gems.
> >
>
> Thanks ... I had not seen that.
>
> Maybe I'm thinking too much in terms of normal Windows deployment but I my
> plan is to take an "unzip anywhere and run" approach rather than using
> rubygems or setup.rb... It should just work as long as Ruby is already
> installed... Would this mean I *have* to use relative paths in my require
> statements from within the libraries to make sure the runtime resolves them
> properly?

Not necessarily, but you would have to add the local directory onto the
lookup path. Something like,

  $:.unshift(Dir.pwd)

> Also, does my namespace/directory layout make sense within a library? I
> definitely see the possibility of like-named classes in different namespaces
> within the same lib so I normally depend on filesystem organization to help
> me keep these separate...
>
> Am I being too anal about this?

I've thought about this myself --this is very Java-esque, yes? Also
Reminds me of Zope. All in all, if it works for you then go for it. But
since it's purely subjective you may find that your just maintining
alot of uneeded directory stucture -- the module hierarchy in your code
speaks for itself. Personally I tend to take a middle ground approach,
splitting up a files per class or subdir for subclasses only when
things get too copious.

T.