[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Rake vs Subversion

Vincent Foley

5/4/2005 10:30:00 PM

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.

2 Answers

James Gray

5/4/2005 10:52:00 PM

0

On May 4, 2005, at 5:34 PM, Vincent Foley wrote:

> 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


Kevin McConnell

5/5/2005 10:05:00 PM

0

Vincent Foley wrote:

> 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?

You could just do "svn export" instead of "svn checkout", in whatever
you use for packaging (Rake task, script, manual process, whatever).
That will give you a working copy without all the .svn folders.

Hope that helps,
Kevin