[Rake-devel] ~/.rake file?

Adam Salter adam.q.salter at gmail.com
Sun Jul 27 10:23:25 EDT 2008


Dear all,
Here's my attempt at this... I'm working on several other  
modifications, but wanted to send this through and see it running  
first. The attached patch works exactly as Jim has requested.

I'm sorry, but I had a little trouble with writing the test mocking  
for a file in the home directory (if you run the tests you'll see what  
I mean)... I've updated all other tests to run as expected.
I'm going out for a couple of days, but will check emails when i get  
back.

Also not tested on Windows (although I see no reason why it shouldn't  
work)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-added-system-wide-.rake-functionality.patch
Type: application/octet-stream
Size: 5258 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/rake-devel/attachments/20080728/d1e3553e/attachment.obj>
-------------- next part --------------



Best,
-Adam

On 30/06/2008, at 11:53 PM, Luis Lavena wrote:

> Sorry I came late to this topic...
>
> On Mon, Jun 30, 2008 at 3:33 PM, Jim Weirich <jim.weirich at gmail.com>  
> wrote:
>>
>> On Jun 30, 2008, at 12:41 AM, Adam Salter wrote:
>>
>>> chroot is not really the same thing... ie it's not really a  
>>> standard or
>>> normal way of having Rake tasks globally available... ie I can't  
>>> use it that
>>> way regularly.
>>> Rakefile in / does work i guess, but makes me think when i said  
>>> 'globally
>>> available' i really meant 'per-user'.
>>>
>>> Still no comment from the great and benevolent leader Jim... ;)
>>
>> You forgot the easily distractible :)
>>
>> I have no strong objection to this change.  Several points:
>>
>> (1) Only reads .rake if if finds no other Rakefile.  This is  
>> important
>> because you don't want to accidently put important build  
>> functionality
>> outside of your project directory.
>>
>
> Good, something like Sake does, you put generic tasks that you usualy
> run for most of your projects (like log:clear) :-)
>
>> (2) If the command line option is given, then the local Rakefile  
>> should be
>> ignored.
>>
>> (3) Where are you going to put the .rake file on a windows machine?
>>
>
> If home is not defined, then should be HOMEDRIVE + HOMEPATH :-)
> If there is not HOMEDRIVE+HOMEPATH, that mean is not a user, but a
> service, then it should look for APPDATA.
>
> If no APPDATA there, it should look for ALLUSERSPROFILE
>
>> (4) Include tests for all changes.  I am much more likely to accept  
>> patches
>> with tests than otherwise.
>>
>> Also, I'm planning on putting a git repository of rake on github in  
>> the very
>> near future (meant to do it this weekend but ran out of time).   
>> That should
>> make it easier for alternate versions.  I'll put an announcement  
>> here when I
>> do.
>>
>
> Great news!
>
> I'll be able to fork and make all the tests for rake actual pass on
> Windows and see what other cross-platform bug we found in ruby itself
> to catch! :-)
>
> Thank you Jim for your hard work :-)
>
> Regards,
> -- 
> Luis Lavena
> AREA 17
> -
> Human beings, who are almost unique in having the ability to learn  
> from
> the experience of others, are also remarkable for their apparent
> disinclination to do so.
> Douglas Adams
> _______________________________________________
> Rake-devel mailing list
> Rake-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rake-devel



More information about the Rake-devel mailing list