Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #33 from opscode-cookbooks/lcg/COOK-3343
Browse files Browse the repository at this point in the history
[CHEF-3343] BUGFIX: use reference to self to find deploy_provider
  • Loading branch information
lamont-granquist committed Nov 4, 2013
2 parents b7fd590 + 00d35eb commit d2c6125
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion providers/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def before_deploy
def run_deploy(force = false)
# Alias to a variable so I can use in sub-resources
new_resource = @new_resource
# Also alias to variable so it can be used in sub-resources
app_provider = self

@deploy_resource = send(new_resource.strategy.to_sym, new_resource.name) do
Expand All @@ -140,7 +141,7 @@ def run_deploy(force = false)
([new_resource]+new_resource.sub_resources).each do |res|
cmd = res.restart_command
if cmd.is_a? Proc
deploy_provider.instance_eval(&cmd) # @see libraries/default.rb
app_provider.deploy_provider.instance_eval(&cmd) # @see libraries/default.rb
elsif cmd && !cmd.empty?
execute cmd do
user new_resource.owner
Expand Down

0 comments on commit d2c6125

Please sign in to comment.