[Nitro] script/ vs helper/ vs script/helper

Arne Brasseur arne at arnebrasseur.net
Thu Jun 21 14:53:34 EDT 2007


Dear devs,

It's been a bit busy over here but I see Jo and G have been doing nice 
stuff, way to go!

I would like to propose some more source tree layout changes, let me 
elaborate:

the script/ dir currently looks like this

script/repl.rb
script/glycerin.rb
script/helper/spec.rb
script/helper/layout.rb
script/helper/wrap.rb

script/repl.rb is meant to replace one token with another in one part of 
the source tree. This functionality is already in place in darcs itself 
(darcs replace). It also seems the better way to do it, since it better 
records the semantics of the operation in the darcs history. Are there 
specific reasons to use a home made script for this, or can we consider 
this redundant?

Now for me a script is something that runs autonomous, where a helper is 
included elsewhere to help. If repl.rb would go, then there are only 
helpers left in the script/ dir. So I would like to propose to move 
helper/ to the top level :

helper/glycerin.rb
helper/spec.rb
helper/layout.rb
helper/wrap.rb

Layout and wrap are used for the specs, and I can imagine other spec 
helpers appearing. So why not move layout and wrap to a spec subdir,

helper/glycerin.rb
helper/spec.rb
helper/spec/layout.rb
helper/spec/wrap.rb

Additional rspec helper stuff could go in there, e.g. I wrote a custom 
Rspec::Matcher to be able to write
day.should be_in(1..31)
in stead of
(1..31).should include day

That would go in helper/spec/in.rb, and be included from helper/spec.rb. 
Nice and clean :)

I can imagine people feeling strong about this so shoot!


regards,

(ab)
who does some more test2spec in the meantime

-- 
Arne Brasseur @ your service
http://www.arnebrasseur.net
arne at arnebrasseur.net
+32/496/94.55.63



More information about the Nitro-general mailing list