Skip to content

Commit

Permalink
Add CHANGELOG entry for #156, add nil checks for container matching m…
Browse files Browse the repository at this point in the history
…ethods
  • Loading branch information
bflad committed Jun 24, 2014
1 parent 357d22c commit 70197bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Major kudos to @tduffield for the [#147][] PR, which includes:
Other awesome work merged:

* [#142][]: Bugfix: Redeploy breaks when a link is present
* [#139][]/[#153][]/[#154][]/[#157][]: Bugfix: container/image ID given as nil, fixes deprecated -notrunc
* [#139][]/[#153][]/[#154][]/[#156][]/[#157][]: Bugfix: container/image ID given as nil, fixes deprecated -notrunc
* [#164][]: Bugfix: Removing a container should also remove its cidfile
* [#166][]: Bugfix: Fix docker_inspect_id for Docker 1.0+
* [#158][]/[#160][]/[#165][]: Bugfix: Fix NameError when displaying error messages for timed-out commands
Expand Down Expand Up @@ -519,6 +519,7 @@ Lots of community contributions this release -- thanks!
[#152]: https://github.com/bflad/chef-docker/issues/152
[#153]: https://github.com/bflad/chef-docker/issues/153
[#154]: https://github.com/bflad/chef-docker/issues/154
[#156]: https://github.com/bflad/chef-docker/issues/156
[#157]: https://github.com/bflad/chef-docker/issues/157
[#158]: https://github.com/bflad/chef-docker/issues/158
[#160]: https://github.com/bflad/chef-docker/issues/160
Expand Down
3 changes: 3 additions & 0 deletions providers/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,17 @@ def container_command_matches_if_exists?(command)
end

def container_id_matches?(id)
return false unless id
id.start_with?(new_resource.id)
end

def container_image_matches?(image)
return false unless image
image.include?(new_resource.image)
end

def container_name_matches?(names)
return false unless names
new_resource.container_name && new_resource.container_name == names
end

Expand Down

0 comments on commit 70197bf

Please sign in to comment.