PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/gems/1.8/gems/rake-0.9.2/test/data/namespace/Rakefile

http://github.com/agross/netopenspace
Rakefile | 64 lines | 55 code | 9 blank | 0 comment | 0 complexity | 74f4892c6e6166af9b6887244f97a95d MD5 | raw file
 1desc "copy"
 2task :copy do
 3  puts "COPY"
 4end
 5
 6namespace "nest" do
 7  desc "nest copy"
 8  task :copy do
 9    puts "NEST COPY"
10  end
11  task :xx => :copy
12end
13
14anon_ns = namespace do
15  desc "anonymous copy task"
16  task :copy do
17    puts "ANON COPY"
18  end
19end
20
21desc "Top level task to run the anonymous version of copy"
22task :anon => anon_ns[:copy]
23
24namespace "very" do
25  namespace "nested" do
26    task "run" => "rake:copy"
27  end
28end
29
30namespace "a" do
31  desc "Run task in the 'a' namespace"
32  task "run" do
33    puts "IN A"
34  end
35end
36
37namespace "b" do
38  desc "Run task in the 'b' namespace"
39  task "run" => "a:run" do
40    puts "IN B"
41  end
42end
43
44namespace "file1" do
45  file "xyz.rb" do
46    puts "XYZ1"
47  end
48end
49
50namespace "file2" do
51  file "xyz.rb" do
52    puts "XYZ2"
53  end
54end
55
56namespace "scopedep" do
57  task :prepare do
58    touch "scopedep.rb"
59    puts "PREPARE"
60  end
61  file "scopedep.rb" => [:prepare] do
62    puts "SCOPEDEP"
63  end
64end