Changeset [2ac1906a3ab0bda997ca3b028b9b20d222faf3fe] by Jamis Buck

June 5th, 2008 @ 09:00 PM

Make block-triggers scope to the task they are attached to.

Prior to this, if you defined (e.g.) a before task using a block,

like this:

before :foo do

puts "current task is #{current_task.name}"

end

And then, you invoked :foo like this:

task :bar do

run "something"

foo

end

You'd see the before-foo block print "bar" as the name of the

current task. This meant that any commands run in the foo before

block would be scoped to the servers of :bar, when it really

makes more sense to scope them to the servers of :foo. This

commit makes it so that the before-foo block, above, would show

"foo" as the name of the current task, rather than "bar".

http://github.com/jamis/capistra...

Committed by Jamis Buck

  • M CHANGELOG
  • M lib/capistrano/configuration/callbacks.rb
  • M lib/capistrano/configuration/execution.rb
  • M test/configuration/callbacks_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »