begin
  gem 'docker-api', '= 1.32.1'
rescue LoadError
  unless defined?(ChefSpec)
    run_context = Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)

    require 'chef/resource/chef_gem'

    docker = Chef::Resource::ChefGem.new('docker-api', run_context)
    docker.version '= 1.32.1'
    docker.run_action(:install)
  end
end

begin
  gem 'docker-api', '= 1.31.0'
rescue LoadError
  unless defined?(ChefSpec)
    run_context = Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)

    require 'chef/resource/chef_gem'

    docker = Chef::Resource::ChefGem.new('docker-api', run_context)
    docker.version '= 1.31.0'
    docker.run_action(:install)
  end
end

Revert "updating docker-api gem version"
Revert "updating docker-api gem version"

This reverts commit 8460758881e0c1dcc81a3a932343055415fc403d.
