Skip to content

Commit

Permalink
Modified Capistrano actor to interpret deploy block as a deploy scrip…
Browse files Browse the repository at this point in the history
…t instead of only loading recipes. Maintains backwards compatibility
  • Loading branch information
bjeanes committed Mar 31, 2009
1 parent f877e1f commit 8d80b31
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/sprinkle/actors/capistrano.rb
Expand Up @@ -25,8 +25,15 @@ def initialize(&block) #:nodoc:
@config = ::Capistrano::Configuration.new
@config.logger.level = Sprinkle::OPTIONS[:verbose] ? ::Capistrano::Logger::INFO : ::Capistrano::Logger::IMPORTANT
@config.set(:password) { ::Capistrano::CLI.password_prompt }

@config.set(:_sprinkle_actor, self)

def @config.recipes(script)
_sprinkle_actor.recipes(script)
end

if block
self.instance_eval &block
@config.instance_eval &block
else
@config.load 'deploy' # normally in the config directory for rails
end
Expand Down

0 comments on commit 8d80b31

Please sign in to comment.