[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

rake variables

Jeff Schwab

4/25/2009 3:03:00 AM

I'm a rake beginner with a couple of questions:

(1) Is there any way to set rake options from the within the Rakefile,
as though they had been specified on the command-line? I always want to
run a particular Rakefile with particular options (e.g. -s).

(2) It seems rake either gives way too much info, or not enough. I want
Make-like behavior: Don't bother telling me about stuff you didn't have
to build, but do tell me when you're actually building something.

I see the potential, and I like it, but I'm starting to feel like I need
a separate Makefile just to run rake.
3 Answers

Jeff Schwab

4/27/2009 1:16:00 PM

0

Jeff Schwab wrote:
> I'm a rake beginner with a couple of questions:
>
> (1) Is there any way to set rake options from the within the Rakefile,
> as though they had been specified on the command-line? I always want to
> run a particular Rakefile with particular options (e.g. -s).
>
> (2) It seems rake either gives way too much info, or not enough. I want
> Make-like behavior: Don't bother telling me about stuff you didn't have
> to build, but do tell me when you're actually building something.
>
> I see the potential, and I like it, but I'm starting to feel like I need
> a separate Makefile just to run rake.

Can anyone recommend a more appropriate forum for these questions?

Jeff Schwab

5/10/2009 2:17:00 PM

0

Jeff Schwab wrote:

> (1) Is there any way to set rake options from the within the Rakefile,
> as though they had been specified on the command-line?

The short answer to this is no. The long answer is that you can use
rake as a library, and within your "rake replacement" script,
preconfigure Rake.application.options however you so choose.

I've just patched rake with support for a RAKEOPT environment variable:

http://github.com/jeffs/rake/t...

$ echo 'task :default do |t| puts t.name end' > Rakefile
$ rake
(in /Users/jeff)
default
$ RAKEOPT=-s rake
default
$

Jeff Schwab

5/26/2009 6:52:00 PM

0

Jeff Schwab wrote:

> I've just patched rake with support for a RAKEOPT environment variable:

Merged into Jim Weirich's mainline:
http://github.com/jimweirich/rake/comm...

Thank you, Jim.