diff --git a/libraries/helpers.rb b/libraries/helpers.rb index e82ed7bfb3..a1125b0ffa 100644 --- a/libraries/helpers.rb +++ b/libraries/helpers.rb @@ -22,6 +22,9 @@ def initialize(timeout) end end + # Exception to signify that the docker command timed out. + class CommandTimeout < RuntimeError; end + def cli_args(spec) cli_line = '' spec.each_pair do |arg, value| diff --git a/providers/container.rb b/providers/container.rb index bcd905cfed..bce218daac 100644 --- a/providers/container.rb +++ b/providers/container.rb @@ -1,7 +1,5 @@ include Helpers::Docker -class CommandTimeout < RuntimeError; end - def load_current_resource @current_resource = Chef::Resource::DockerContainer.new(new_resource) wait_until_ready! diff --git a/providers/image.rb b/providers/image.rb index b7055feaa1..8f8ab59aa7 100644 --- a/providers/image.rb +++ b/providers/image.rb @@ -1,7 +1,5 @@ include Helpers::Docker -class CommandTimeout < RuntimeError; end - def load_current_resource wait_until_ready! @current_resource = Chef::Resource::DockerImage.new(new_resource) diff --git a/providers/registry.rb b/providers/registry.rb index 9bd47d5445..f42a197f18 100644 --- a/providers/registry.rb +++ b/providers/registry.rb @@ -1,7 +1,5 @@ include Helpers::Docker -class CommandTimeout < RuntimeError; end - def load_current_resource @current_resource = Chef::Resource::DockerRegistry.new(new_resource) wait_until_ready!