On Thu, 30 Nov 2006 21:57:10 -0000, Trans <transfire / gmail.com> wrote:

>
> Jason Roelofs wrote:
>> Rakefiles allow users to run the tests for themselves, to understand  
>> how a
>> library is put together, etc. The only thing that can go wrong is that  
>> the
>> stuff doesn't work (unless you're grabbing very untrustworthy packages,  
>> but
>> assumptions have to be made somewhere). Not to mention, having the  
>> Rakefile
>> there allows other people to properly make changes to a library if /  
>> when
>> they need to.
>>
>> I don't see anything bad with including said Rakefiles. Do you have any
>> specific worries?
>
> Yes. For instance I have a little backup task that I sometimes use to
> make an archival copy of my project. I'll use it when I'm about to try
> out another build task that could potentially screw my project up if I
> made some mistake (rarely used but I try to be cautious). The backup
> gets saved in a special directory just above the project directory
> which obviously won't exist on someone elses system in their gem
> folder.
>
> Another example is a task for uploading the project's website to a
> host. I'm not inclined to distribute my projects website with the dist.
> release and I don't expect anyone to be using that task buyt me.
>

The way I've come to approach this is to have a local rakefile in which I  
define tasks for stuff like publishing the website and taking backups,  
based around my standard project layout and tasks, which I then either  
require (conditionally) from the project-specific rakefile, or require as  
I need it with e.g.:

	rake -r ~/.local_rake_tasks.rb some_task other_task

-- 
Ross Bamford - rosco / roscopeco.remove.co.uk