Skip to content

Commit

Permalink
Use the readme's examples in Cape::DSL#mirror_rake_tasks documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
njonsson committed Nov 28, 2012
1 parent 8f7bb68 commit 224e938
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions lib/cape/dsl.rb
Expand Up @@ -143,22 +143,31 @@ def method_missing(method, *args, &block)
# mirror_rake_tasks
# end
#
# @example Mirroring specific Rake tasks
# @example Mirroring some Rake tasks, but not others
# # config/deploy.rb
#
# require 'cape'
#
# Cape do
# mirror_rake_tasks 'log:clear'
# # Create Capistrano recipes for the Rake task 'foo' and/or for the
# # tasks in the 'foo' namespace.
# mirror_rake_tasks :foo
# end
#
# @example Mirroring specific Rake tasks with Capistrano recipe options and/or environment variables
# @example Mirroring Rake tasks that require Capistrano recipe options and/or environment variables
# # config/deploy.rb
#
# require 'cape'
#
# Cape do
# mirror_rake_tasks :db, :roles => :app do |env|
# # Display defined Rails routes on application server remote machines
# # only.
# mirror_rake_tasks :routes, :roles => :app
#
# # Execute database migration on application server remote machines
# # only, and set the 'RAILS_ENV' environment variable to the value of
# # the Capistrano variable 'rails_env'.
# mirror_rake_tasks 'db:migrate', :roles => :app do |env|
# env['RAILS_ENV'] = rails_env
# end
# end
Expand Down

0 comments on commit 224e938

Please sign in to comment.