From: Jim Freeze Date: 2003-05-28T07:45:54+09:00 Subject: Re: Project Directory Structure On Wednesday, 28 May 2003 at 1:45:56 +0900, Robert Feldt wrote: > On Wed, 28 May 2003, Jim Freeze wrote: > > If you have scripts that help pack the tarball etc, ie. scripts that > are used in the project but not included when shipped, where should they > go? (/bin?) > Good question. My intended use of bin is for what gets installed into PREFIX/bin or ruby_path/bin. I have not addressed project dependent packaging code. I have not looked recently, but I assume that the package managers can be configured to ignore certain directories. For example, I think CVS is usually ignored. What is your opinion of using directory names that begin with '.' for this purpose? > I tend to use a top-level dir "helpers" for these scripts currently but it > would be nice to see how others handle this. > > Another comment is that I don't like "examples" in pluralis but "test" in > singularis; I tend to use "tests". However, most of the others are > singularis I guess... ;) Yes, it is inconsistent. I have changed examples to example in my script. > Yet another issue is whether people recommend structure within test dir? I > have started using the same structure as in lib and ext ie. the unit tests > for the code in lib/cryptor/public_key goes into > tests/unit/cryptor/public_key etc (I use "tests/unit" since I have > acceptance tests in tests/acceptance but maybe that is taking things too Sorry to be stupid, but how do acceptance tests differ from unit tests and why do you want to keep them seperate? Would not all of them be necessary for full validation? > far...). I have felt the need to add structure to the tests dir since > test-first design often lead to as much (or more) test code as the code > itself. With one flat, big tests dir it was hard to get an overview. I I have to agree. For larger projects, this would be a real benefit. I will add that it is suggested that the directories under test parallel the directories under lib. > also have a single script tests/run_all_tests.rb so that the command > > ruby -Ilib tests/run_all_tests.rb > > runs them all. > I use a top level make inside test and just do: make which recursively calls all my tests. I find this very useful, but have not proved it for multiple OS's (ie, may not be windows friendly). -- Jim Freeze ---------- "Always try to do things in chronological order; it's less confusing that way."