Rake vs Subversion

V

Vincent Foley

Hello,

I have a question for people who use both Rake and Subversion: is there
a way to make an Rake::RDocTask not delete the whole documentation
folder? Because right now, when I call rake with my rdoc task, it
nukes the folder, including the .svn/ directory in it. Right now I
generate documentation in another directory, but I would really like to
know if there's a way to make Rake and Subversion play nice.

And while we're talking about Subversion, is there a way when comes the
time to package my app to select everything but the .svn folders?

Thanks,

Vincent.
 
J

James Edward Gray II

Hello,

I have a question for people who use both Rake and Subversion: is
there
a way to make an Rake::RDocTask not delete the whole documentation
folder? Because right now, when I call rake with my rdoc task, it
nukes the folder, including the .svn/ directory in it. Right now I
generate documentation in another directory, but I would really
like to
know if there's a way to make Rake and Subversion play nice.

Well, the general thinking here is that RDoc documentation should not
be version controlled. It can be recreated from the source at any
time, so storing it just provides the window for it to get out of
sync with the current state of the code.

If that makes sense to you, just propset svn:ignore for the rdoc
directory.
And while we're talking about Subversion, is there a way when comes
the
time to package my app to select everything but the .svn folders?

When you pass the file list to your Rake packaging task, use
something like:

Dir.glob("{examples,lib,test}/**/*.rb").delete_if { |item|
item.include?(".svn") }

The delete_if() isn't even needed in this instance, because .svn
won't end in .rb. I just put it in there to give you ideas. Now
that I think about it, I'm not even sure if Dir.glob() returns things
that begin with a . character.

Anyway, hope some of that babble gives you a leaping off point. :D

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top