From 70f11a08a478c94d4c7d01a7b86ad87d5d71b8c6 Mon Sep 17 00:00:00 2001 From: Nick Laferriere Date: Sat, 31 Oct 2015 21:25:12 -0400 Subject: [PATCH 1/4] breaking out versions to seperate strings --- lib/centurion/docker_via_api.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/centurion/docker_via_api.rb b/lib/centurion/docker_via_api.rb index 01ae94b3..4231acfe 100644 --- a/lib/centurion/docker_via_api.rb +++ b/lib/centurion/docker_via_api.rb @@ -14,7 +14,7 @@ def initialize(hostname, port, tls_args = {}) end def ps(options={}) - path = "/v1.7/containers/json" + path = "/v1.7" + "/containers/json" path += "?all=1" if options[:all] response = Excon.get(@base_uri + path, tls_excon_arguments) @@ -24,7 +24,7 @@ def ps(options={}) def inspect_image(image, tag = "latest") repository = "#{image}:#{tag}" - path = "/v1.7/images/#{repository}/json" + path = "/v1.7" + "/images/#{repository}/json" response = Excon.get( @base_uri + path, @@ -35,7 +35,7 @@ def inspect_image(image, tag = "latest") end def remove_container(container_id) - path = "/v1.7/containers/#{container_id}" + path = "/v1.7" + "/containers/#{container_id}" response = Excon.delete( @base_uri + path, tls_excon_arguments @@ -45,7 +45,7 @@ def remove_container(container_id) end def stop_container(container_id, timeout = 30) - path = "/v1.7/containers/#{container_id}/stop?t=#{timeout}" + path = "/v1.7" + "/containers/#{container_id}/stop?t=#{timeout}" response = Excon.post( @base_uri + path, tls_excon_arguments @@ -55,7 +55,7 @@ def stop_container(container_id, timeout = 30) end def create_container(configuration, name = nil) - path = "/v1.10/containers/create" + path = "/v1.10" + "/containers/create" response = Excon.post( @base_uri + path, tls_excon_arguments.merge( @@ -69,7 +69,7 @@ def create_container(configuration, name = nil) end def start_container(container_id, configuration) - path = "/v1.10/containers/#{container_id}/start" + path = "/v1.10" + "/containers/#{container_id}/start" response = Excon.post( @base_uri + path, tls_excon_arguments.merge( @@ -88,7 +88,7 @@ def start_container(container_id, configuration) end def restart_container(container_id, timeout = 30) - path = "/v1.10/containers/#{container_id}/restart?t=#{timeout}" + path = "/v1.10" + "/containers/#{container_id}/restart?t=#{timeout}" response = Excon.post( @base_uri + path, tls_excon_arguments @@ -106,7 +106,7 @@ def restart_container(container_id, timeout = 30) end def inspect_container(container_id) - path = "/v1.7/containers/#{container_id}/json" + path = "/v1.7" + "/containers/#{container_id}/json" response = Excon.get( @base_uri + path, tls_excon_arguments From 62d5cd37e58bf74515c150b0fcd750de6a4737a2 Mon Sep 17 00:00:00 2001 From: Nick Laferriere Date: Sat, 31 Oct 2015 21:31:05 -0400 Subject: [PATCH 2/4] upgrade to v12 --- lib/centurion/docker_via_api.rb | 16 +++++------ spec/docker_via_api_spec.rb | 48 ++++++++++++++++----------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/centurion/docker_via_api.rb b/lib/centurion/docker_via_api.rb index 4231acfe..6d6a3145 100644 --- a/lib/centurion/docker_via_api.rb +++ b/lib/centurion/docker_via_api.rb @@ -14,7 +14,7 @@ def initialize(hostname, port, tls_args = {}) end def ps(options={}) - path = "/v1.7" + "/containers/json" + path = "/v1.12" + "/containers/json" path += "?all=1" if options[:all] response = Excon.get(@base_uri + path, tls_excon_arguments) @@ -24,7 +24,7 @@ def ps(options={}) def inspect_image(image, tag = "latest") repository = "#{image}:#{tag}" - path = "/v1.7" + "/images/#{repository}/json" + path = "/v1.12" + "/images/#{repository}/json" response = Excon.get( @base_uri + path, @@ -35,7 +35,7 @@ def inspect_image(image, tag = "latest") end def remove_container(container_id) - path = "/v1.7" + "/containers/#{container_id}" + path = "/v1.12" + "/containers/#{container_id}" response = Excon.delete( @base_uri + path, tls_excon_arguments @@ -45,7 +45,7 @@ def remove_container(container_id) end def stop_container(container_id, timeout = 30) - path = "/v1.7" + "/containers/#{container_id}/stop?t=#{timeout}" + path = "/v1.12" + "/containers/#{container_id}/stop?t=#{timeout}" response = Excon.post( @base_uri + path, tls_excon_arguments @@ -55,7 +55,7 @@ def stop_container(container_id, timeout = 30) end def create_container(configuration, name = nil) - path = "/v1.10" + "/containers/create" + path = "/v1.12" + "/containers/create" response = Excon.post( @base_uri + path, tls_excon_arguments.merge( @@ -69,7 +69,7 @@ def create_container(configuration, name = nil) end def start_container(container_id, configuration) - path = "/v1.10" + "/containers/#{container_id}/start" + path = "/v1.12" + "/containers/#{container_id}/start" response = Excon.post( @base_uri + path, tls_excon_arguments.merge( @@ -88,7 +88,7 @@ def start_container(container_id, configuration) end def restart_container(container_id, timeout = 30) - path = "/v1.10" + "/containers/#{container_id}/restart?t=#{timeout}" + path = "/v1.12" + "/containers/#{container_id}/restart?t=#{timeout}" response = Excon.post( @base_uri + path, tls_excon_arguments @@ -106,7 +106,7 @@ def restart_container(container_id, timeout = 30) end def inspect_container(container_id) - path = "/v1.7" + "/containers/#{container_id}/json" + path = "/v1.12" + "/containers/#{container_id}/json" response = Excon.get( @base_uri + path, tls_excon_arguments diff --git a/spec/docker_via_api_spec.rb b/spec/docker_via_api_spec.rb index d7b1bbf8..16be17f2 100644 --- a/spec/docker_via_api_spec.rb +++ b/spec/docker_via_api_spec.rb @@ -13,14 +13,14 @@ it 'lists processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/json', {}). + with(excon_uri + 'v1.12/containers/json', {}). and_return(double(body: json_string, status: 200)) expect(api.ps).to eq(json_value) end it 'lists all processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/json?all=1', {}). + with(excon_uri + 'v1.12/containers/json?all=1', {}). and_return(double(body: json_string, status: 200)) expect(api.ps(all: true)).to eq(json_value) end @@ -29,7 +29,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/create", + with(excon_uri + "v1.12" + "/containers/create", query: nil, body: configuration_as_json, headers: {'Content-Type' => 'application/json'}). @@ -41,7 +41,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/create", + with(excon_uri + "v1.12" + "/containers/create", query: { name: match(/^app1-[a-f0-9]+$/) }, body: configuration_as_json, headers: {'Content-Type' => 'application/json'}). @@ -53,7 +53,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/12345/start", + with(excon_uri + "v1.12" + "/containers/12345/start", body: configuration_as_json, headers: {'Content-Type' => 'application/json'}). and_return(double(body: json_string, status: 204)) @@ -62,49 +62,49 @@ it 'stops a container' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.7/containers/12345/stop?t=300', {}). + with(excon_uri + 'v1.12/containers/12345/stop?t=300', {}). and_return(double(status: 204)) api.stop_container('12345', 300) end it 'stops a container with a custom timeout' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.7/containers/12345/stop?t=30', {}). + with(excon_uri + 'v1.12/containers/12345/stop?t=30', {}). and_return(double(status: 204)) api.stop_container('12345') end it 'restarts a container' do expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/12345/restart?t=30", {}). + with(excon_uri + "v1.12" + "/containers/12345/restart?t=30", {}). and_return(double(body: json_string, status: 204)) api.restart_container('12345') end it 'restarts a container with a custom timeout' do expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/12345/restart?t=300", {}). + with(excon_uri + "v1.12" + "/containers/12345/restart?t=300", {}). and_return(double(body: json_string, status: 204)) api.restart_container('12345', 300) end it 'inspects a container' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/12345/json', {}). + with(excon_uri + 'v1.12/containers/12345/json', {}). and_return(double(body: json_string, status: 200)) expect(api.inspect_container('12345')).to eq(json_value) end it 'removes a container' do expect(Excon).to receive(:delete). - with(excon_uri + 'v1.7/containers/12345', {}). + with(excon_uri + 'v1.12/containers/12345', {}). and_return(double(status: 204)) expect(api.remove_container('12345')).to eq(true) end it 'inspects an image' do expect(Excon).to receive(:get). - with(excon_uri + "v1.7" + "/images/foo:bar/json", + with(excon_uri + "v1.12" + "/images/foo:bar/json", headers: {'Accept' => 'application/json'}). and_return(double(body: json_string, status: 200)) expect(api.inspect_image('foo', 'bar')).to eq(json_value) @@ -120,7 +120,7 @@ it 'lists processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/json', + with(excon_uri + 'v1.12/containers/json', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 200)) @@ -129,7 +129,7 @@ it 'lists all processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/json?all=1', + with(excon_uri + 'v1.12/containers/json?all=1', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 200)) @@ -138,7 +138,7 @@ it 'inspects an image' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/images/foo:bar/json', + with(excon_uri + 'v1.12/images/foo:bar/json', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem', headers: {'Accept' => 'application/json'}). @@ -150,7 +150,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + 'v1.10/containers/create', + with(excon_uri + 'v1.12/containers/create', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem', query: nil, @@ -164,7 +164,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + 'v1.10/containers/12345/start', + with(excon_uri + 'v1.12/containers/12345/start', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem', body: configuration_as_json, @@ -175,7 +175,7 @@ it 'stops a container' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.7/containers/12345/stop?t=300', + with(excon_uri + 'v1.12/containers/12345/stop?t=300', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(status: 204)) @@ -184,7 +184,7 @@ it 'stops a container with a custom timeout' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.7/containers/12345/stop?t=30', + with(excon_uri + 'v1.12/containers/12345/stop?t=30', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(status: 204)) @@ -193,7 +193,7 @@ it 'restarts a container' do expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/12345/restart?t=30", + with(excon_uri + "v1.12" + "/containers/12345/restart?t=30", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 204)) @@ -202,7 +202,7 @@ it 'restarts a container with a custom timeout' do expect(Excon).to receive(:post). - with(excon_uri + "v1.10" + "/containers/12345/restart?t=300", + with(excon_uri + "v1.12" + "/containers/12345/restart?t=300", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 204)) @@ -211,7 +211,7 @@ it 'inspects a container' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/12345/json', + with(excon_uri + 'v1.12/containers/12345/json', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 200)) @@ -220,7 +220,7 @@ it 'removes a container' do expect(Excon).to receive(:delete). - with(excon_uri + 'v1.7/containers/12345', + with(excon_uri + 'v1.12/containers/12345', client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(status: 204)) @@ -235,7 +235,7 @@ it 'lists processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.7/containers/json', + with(excon_uri + 'v1.12/containers/json', client_cert: File.expand_path('~/.docker/cert.pem'), client_key: File.expand_path('~/.docker/key.pem')). and_return(double(body: json_string, status: 200)) From 09751f38807e4cc4ac62e8593a80de9df8da06fd Mon Sep 17 00:00:00 2001 From: Nick Laferriere Date: Sat, 31 Oct 2015 21:37:42 -0400 Subject: [PATCH 3/4] making everything identical for strings and seperate versions --- spec/docker_via_api_spec.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/spec/docker_via_api_spec.rb b/spec/docker_via_api_spec.rb index 16be17f2..50f11a87 100644 --- a/spec/docker_via_api_spec.rb +++ b/spec/docker_via_api_spec.rb @@ -13,14 +13,14 @@ it 'lists processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/json', {}). + with(excon_uri + "v1.12" + "/containers/json", {}). and_return(double(body: json_string, status: 200)) expect(api.ps).to eq(json_value) end it 'lists all processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/json?all=1', {}). + with(excon_uri + "v1.12" + "/containers/json?all=1", {}). and_return(double(body: json_string, status: 200)) expect(api.ps(all: true)).to eq(json_value) end @@ -62,14 +62,14 @@ it 'stops a container' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.12/containers/12345/stop?t=300', {}). + with(excon_uri + "v1.12" + "/containers/12345/stop?t=300", {}). and_return(double(status: 204)) api.stop_container('12345', 300) end it 'stops a container with a custom timeout' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.12/containers/12345/stop?t=30', {}). + with(excon_uri + "v1.12" + "/containers/12345/stop?t=30", {}). and_return(double(status: 204)) api.stop_container('12345') end @@ -90,14 +90,14 @@ it 'inspects a container' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/12345/json', {}). + with(excon_uri + "v1.12" + "/containers/12345/json", {}). and_return(double(body: json_string, status: 200)) expect(api.inspect_container('12345')).to eq(json_value) end it 'removes a container' do expect(Excon).to receive(:delete). - with(excon_uri + 'v1.12/containers/12345', {}). + with(excon_uri + "v1.12" + "/containers/12345", {}). and_return(double(status: 204)) expect(api.remove_container('12345')).to eq(true) end @@ -120,7 +120,7 @@ it 'lists processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/json', + with(excon_uri + "v1.12" + "/containers/json", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 200)) @@ -129,7 +129,7 @@ it 'lists all processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/json?all=1', + with(excon_uri + "v1.12" + "/containers/json?all=1", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 200)) @@ -138,7 +138,7 @@ it 'inspects an image' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/images/foo:bar/json', + with(excon_uri + "v1.12" + "/images/foo:bar/json", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem', headers: {'Accept' => 'application/json'}). @@ -150,7 +150,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + 'v1.12/containers/create', + with(excon_uri + "v1.12" + "/containers/create", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem', query: nil, @@ -164,7 +164,7 @@ configuration_as_json = double configuration = double(to_json: configuration_as_json) expect(Excon).to receive(:post). - with(excon_uri + 'v1.12/containers/12345/start', + with(excon_uri + "v1.12" + "/containers/12345/start", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem', body: configuration_as_json, @@ -175,7 +175,7 @@ it 'stops a container' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.12/containers/12345/stop?t=300', + with(excon_uri + "v1.12" + "/containers/12345/stop?t=300", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(status: 204)) @@ -184,7 +184,7 @@ it 'stops a container with a custom timeout' do expect(Excon).to receive(:post). - with(excon_uri + 'v1.12/containers/12345/stop?t=30', + with(excon_uri + "v1.12" + "/containers/12345/stop?t=30", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(status: 204)) @@ -211,7 +211,7 @@ it 'inspects a container' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/12345/json', + with(excon_uri + "v1.12" + "/containers/12345/json", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(body: json_string, status: 200)) @@ -220,7 +220,7 @@ it 'removes a container' do expect(Excon).to receive(:delete). - with(excon_uri + 'v1.12/containers/12345', + with(excon_uri + "v1.12" + "/containers/12345", client_cert: '/certs/cert.pem', client_key: '/certs/key.pem'). and_return(double(status: 204)) @@ -235,7 +235,7 @@ it 'lists processes' do expect(Excon).to receive(:get). - with(excon_uri + 'v1.12/containers/json', + with(excon_uri + "v1.12" + "/containers/json", client_cert: File.expand_path('~/.docker/cert.pem'), client_key: File.expand_path('~/.docker/key.pem')). and_return(double(body: json_string, status: 200)) From b013b618370a94d8e80bcef1100aa16bd54f409c Mon Sep 17 00:00:00 2001 From: Nick Laferriere Date: Sat, 31 Oct 2015 22:04:24 -0400 Subject: [PATCH 4/4] made docker via api class more dynamic, by allowing api version to be past to it --- CONTRIBUTORS.md | 1 + lib/centurion/docker_server.rb | 2 +- lib/centurion/docker_via_api.rb | 21 +++++++++++---------- lib/centurion/version.rb | 2 +- spec/docker_via_api_spec.rb | 1 + 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 23e4da99..0b007468 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -12,6 +12,7 @@ Your name could be here! * [Suren Karapetyan][skarap] * [Jon Wood][jellybob] * [Mark Borcherding][markborcherding] + * [Nick Laferriere][laferrieren] Pre-release ----------- diff --git a/lib/centurion/docker_server.rb b/lib/centurion/docker_server.rb index d96fdb58..6ba9b2a1 100644 --- a/lib/centurion/docker_server.rb +++ b/lib/centurion/docker_server.rb @@ -64,7 +64,7 @@ def old_containers_for_name(wanted_name) def docker_via_api @docker_via_api ||= Centurion::DockerViaApi.new(@hostname, @port, - @tls_params) + @tls_params, nil) end def docker_via_cli diff --git a/lib/centurion/docker_via_api.rb b/lib/centurion/docker_via_api.rb index 6d6a3145..1303ce4a 100644 --- a/lib/centurion/docker_via_api.rb +++ b/lib/centurion/docker_via_api.rb @@ -6,15 +6,16 @@ module Centurion; end class Centurion::DockerViaApi - def initialize(hostname, port, tls_args = {}) + def initialize(hostname, port, tls_args = {}, api_version = nil) @tls_args = default_tls_args(tls_args[:tls]).merge(tls_args.reject { |k, v| v.nil? }) # Required by tls_enable? @base_uri = "http#{'s' if tls_enable?}://#{hostname}:#{port}" - + api_version ||= "/v1.12" + @docker_api_version = api_version configure_excon_globally end def ps(options={}) - path = "/v1.12" + "/containers/json" + path = @docker_api_version + "/containers/json" path += "?all=1" if options[:all] response = Excon.get(@base_uri + path, tls_excon_arguments) @@ -24,7 +25,7 @@ def ps(options={}) def inspect_image(image, tag = "latest") repository = "#{image}:#{tag}" - path = "/v1.12" + "/images/#{repository}/json" + path = @docker_api_version + "/images/#{repository}/json" response = Excon.get( @base_uri + path, @@ -35,7 +36,7 @@ def inspect_image(image, tag = "latest") end def remove_container(container_id) - path = "/v1.12" + "/containers/#{container_id}" + path = @docker_api_version + "/containers/#{container_id}" response = Excon.delete( @base_uri + path, tls_excon_arguments @@ -45,7 +46,7 @@ def remove_container(container_id) end def stop_container(container_id, timeout = 30) - path = "/v1.12" + "/containers/#{container_id}/stop?t=#{timeout}" + path = @docker_api_version + "/containers/#{container_id}/stop?t=#{timeout}" response = Excon.post( @base_uri + path, tls_excon_arguments @@ -55,7 +56,7 @@ def stop_container(container_id, timeout = 30) end def create_container(configuration, name = nil) - path = "/v1.12" + "/containers/create" + path = @docker_api_version + "/containers/create" response = Excon.post( @base_uri + path, tls_excon_arguments.merge( @@ -69,7 +70,7 @@ def create_container(configuration, name = nil) end def start_container(container_id, configuration) - path = "/v1.12" + "/containers/#{container_id}/start" + path = @docker_api_version + "/containers/#{container_id}/start" response = Excon.post( @base_uri + path, tls_excon_arguments.merge( @@ -88,7 +89,7 @@ def start_container(container_id, configuration) end def restart_container(container_id, timeout = 30) - path = "/v1.12" + "/containers/#{container_id}/restart?t=#{timeout}" + path = @docker_api_version + "/containers/#{container_id}/restart?t=#{timeout}" response = Excon.post( @base_uri + path, tls_excon_arguments @@ -106,7 +107,7 @@ def restart_container(container_id, timeout = 30) end def inspect_container(container_id) - path = "/v1.12" + "/containers/#{container_id}/json" + path = @docker_api_version + "/containers/#{container_id}/json" response = Excon.get( @base_uri + path, tls_excon_arguments diff --git a/lib/centurion/version.rb b/lib/centurion/version.rb index df48bbb0..649180ca 100644 --- a/lib/centurion/version.rb +++ b/lib/centurion/version.rb @@ -1,3 +1,3 @@ module Centurion - VERSION = '1.8.2' + VERSION = '1.8.3' end diff --git a/spec/docker_via_api_spec.rb b/spec/docker_via_api_spec.rb index 50f11a87..d659731d 100644 --- a/spec/docker_via_api_spec.rb +++ b/spec/docker_via_api_spec.rb @@ -4,6 +4,7 @@ describe Centurion::DockerViaApi do let(:hostname) { 'example.com' } let(:port) { '2375' } + let(:api_version) { '1.12' } let(:json_string) { '[{ "Hello": "World" }]' } let(:json_value) { JSON.load(json_string) }