[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Rake, Namespaces, and dependencies

S. Robert James

11/17/2006 2:31:00 AM

I can't figure out the correct syntax in a Rakefile to say that a
certain task depends on a task in a different namespace. What is it?

4 Answers

S. Robert James

11/17/2006 4:13:00 PM

0


S. Robert James wrote:
> I can't figure out the correct syntax in a Rakefile to say that a
> certain task depends on a task in a different namespace. What is it?

If my question isn't clear, please let me know. Is there no way to do
this?

S. Robert James

11/17/2006 6:16:00 PM

0


S. Robert James wrote:
> I can't figure out the correct syntax in a Rakefile to say that a
> certain task depends on a task in a different namespace. What is it?

task :ci => [:rcov_params, namespace(:test)[:rcov] ]
doesn't work

Mauricio Fernández

11/17/2006 6:41:00 PM

0

On Sat, Nov 18, 2006 at 03:20:08AM +0900, S. Robert James wrote:
>
> S. Robert James wrote:
> > I can't figure out the correct syntax in a Rakefile to say that a
> > certain task depends on a task in a different namespace. What is it?
>
> task :ci => [:rcov_params, namespace(:test)[:rcov] ]
> doesn't work

$ cat Rakefile
namespace :foo do
namespace :bar do
desc "nested baz"
task :baz do
puts "foo:bar:baz"
end
end

desc "outer baz"
task :bar => "foo:bar:baz" do
puts "foo:bar"
end
end
$ rake -T
(in /home/batsman/mess/2006/46)
rake foo:bar # outer baz
rake foo:bar:baz # nested baz
$ rake foo:bar
(in /home/batsman/mess/2006/46)
foo:bar:baz
foo:bar


--
Mauricio Fernandez - http://eige... - singular Ruby

S. Robert James

11/17/2006 8:00:00 PM

0

Thanks.

Mauricio Fernandez wrote:
> On Sat, Nov 18, 2006 at 03:20:08AM +0900, S. Robert James wrote:
> >
> > S. Robert James wrote:
> > > I can't figure out the correct syntax in a Rakefile to say that a
> > > certain task depends on a task in a different namespace. What is it?
> >
> > task :ci => [:rcov_params, namespace(:test)[:rcov] ]
> > doesn't work
>
> $ cat Rakefile
> namespace :foo do
> namespace :bar do
> desc "nested baz"
> task :baz do
> puts "foo:bar:baz"
> end
> end
>
> desc "outer baz"
> task :bar => "foo:bar:baz" do
> puts "foo:bar"
> end
> end
> $ rake -T
> (in /home/batsman/mess/2006/46)
> rake foo:bar # outer baz
> rake foo:bar:baz # nested baz
> $ rake foo:bar
> (in /home/batsman/mess/2006/46)
> foo:bar:baz
> foo:bar
>
>
> --
> Mauricio Fernandez - http://eige... - singular Ruby