Skip to content

Commit

Permalink
Merge pull request #7 from dhl/patch-1
Browse files Browse the repository at this point in the history
Proper formatting of code example in the Namespacing Tasks section.
  • Loading branch information
leehambley committed Aug 2, 2011
2 parents 7b14d45 + 1a239ea commit 79b8751
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ It stands to reason that with such a wide scope of available uses, there would b

Defining a task in this way, and more about how the task blocks are arranged is forthcoming; however imagine we had two tasks `backup` perhaps, that needed to work differently on different roles.. here's how namepsaces solve that problem

namespace :web_server do
task :backup do
puts "In Example Backup Web-Server"
namespace :web_server do
task :backup do
puts "In Example Backup Web-Server"
end
end
end

namespace :database_server do
task :backup do
puts "In Example Backup Database-Server"
namespace :database_server do
task :backup do
puts "In Example Backup Database-Server"
end
end
end

Whilst the tasks in the first example might be listed by `cap -T` as:

Expand Down

0 comments on commit 79b8751

Please sign in to comment.