Skip to content

Commit

Permalink
Merge pull request #205 from jperville/fix-current-resource-name-in-p…
Browse files Browse the repository at this point in the history
…roviders

Use new_resource.name as parameter value instead of new_resource in providers.
  • Loading branch information
Tom Duffield committed Oct 24, 2014
2 parents d5543f4 + e9e8a62 commit 2520194
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion providers/container.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include Docker::Helpers

def load_current_resource
@current_resource = Chef::Resource::DockerContainer.new(new_resource)
@current_resource = Chef::Resource::DockerContainer.new(new_resource.name)
wait_until_ready!
docker_containers.each do |ps|
next unless container_matches?(ps)
Expand Down
2 changes: 1 addition & 1 deletion providers/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def load_current_resource
wait_until_ready!
@current_resource = Chef::Resource::DockerImage.new(new_resource)
@current_resource = Chef::Resource::DockerImage.new(new_resource.name)
dimages = docker_cmd('images -a --no-trunc')
if dimages.stdout.include?(new_resource.image_name)
dimages.stdout.each_line do |di_line|
Expand Down
2 changes: 1 addition & 1 deletion providers/registry.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include Docker::Helpers

def load_current_resource
@current_resource = Chef::Resource::DockerRegistry.new(new_resource)
@current_resource = Chef::Resource::DockerRegistry.new(new_resource.name)
wait_until_ready!
dockercfg = dockercfg_parse
if dockercfg && login_matches(dockercfg[new_resource.server])
Expand Down

0 comments on commit 2520194

Please sign in to comment.