summaryrefslogtreecommitdiff
path: root/test/rake/data/namespace/Rakefile
blob: 6de98edae9024c32d3cc35fe31b8ee04a476f6be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env ruby

desc "copy"
task :copy do
  puts "COPY"
end

namespace "nest" do
  desc "nest copy"
  task :copy do
    puts "NEST COPY"
  end
  task :xx => :copy
end

anon_ns = namespace do
  desc "anonymous copy task"
  task :copy do
    puts "ANON COPY"
  end
end

desc "Top level task to run the anonymous version of copy"
task :anon => anon_ns[:copy]

namespace "very" do
  namespace "nested" do
    task "run" => "rake:copy"
  end
end

namespace "a" do
  desc "Run task in the 'a' namespace"
  task "run" do
    puts "IN A"
  end
end

namespace "b" do
  desc "Run task in the 'b' namespace"
  task "run" => "a:run" do
    puts "IN B"
  end
end

namespace "file1" do
  file "xyz.rb" do
    puts "XYZ1"
  end
end

namespace "file2" do
  file "xyz.rb" do
    puts "XYZ2"
  end
end