docker-api 1.21.0 → 1.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c60e727e41589271f61a49d530a0dded82d81448
4
- data.tar.gz: da74b0b29b1732a2aaabca6dc0dddca84d628a9e
3
+ metadata.gz: c3b954af22c1f99df2d9c36fdfc54411ace8e434
4
+ data.tar.gz: 5b8b371ba9160fea4c186c398edf4254fc28f97f
5
5
  SHA512:
6
- metadata.gz: 5dd6e22287a43e0fb91fddd529c371c44e0b2c5de387e10d973be9d71de3b917c887f7e3b9fd20771be6210b4480e2f59f78f9d7f16dc29fb0de053343bc9bf1
7
- data.tar.gz: e455ff3b6fda2c4d3eb86d044b0bd9a09705b6bcfa6f969576e0d142a8f8fb39243b4fcc242a522840a773551321feab29308d4bd6c951fe11fbe8c9a2de0a58
6
+ metadata.gz: 9c04fcb8a4379637be10ad3a5b5cbf3e12b683daad49a261fc847815a8dda8674a4a5d1abdcc6267433415ed2d6661d831df29e83374264878fb5e62c6adf401
7
+ data.tar.gz: 3c3aa39c4368253d522e10d8c6619b98d5de008bec64222beef957f936dcd917a513dcb29b53047a6d38385f7dd40ca5b474b1d5a8b7e59d7be72e9732e2e28a
data/.cane CHANGED
@@ -1,2 +1,2 @@
1
- --abc-max 16
1
+ --abc-max 17
2
2
  --style-measure 100
@@ -36,24 +36,28 @@ class Docker::Connection
36
36
  # Send a request to the server with the `
37
37
  def request(*args, &block)
38
38
  request = compile_request_params(*args, &block)
39
- if Docker.logger
40
- Docker.logger.debug(
41
- [request[:method], request[:path], request[:query], request[:body]]
42
- )
43
- end
39
+ log_request(request)
44
40
  resource.request(request).body
45
41
  rescue Excon::Errors::BadRequest => ex
46
- raise ClientError, ex.message
42
+ raise ClientError, ex.response.body
47
43
  rescue Excon::Errors::Unauthorized => ex
48
- raise UnauthorizedError, ex.message
44
+ raise UnauthorizedError, ex.response.body
49
45
  rescue Excon::Errors::NotFound => ex
50
- raise NotFoundError, ex.message
46
+ raise NotFoundError, ex.response.body
51
47
  rescue Excon::Errors::Conflict => ex
52
- raise ConflictError, ex.message
48
+ raise ConflictError, ex.response.body
53
49
  rescue Excon::Errors::InternalServerError => ex
54
- raise ServerError, ex.response.data[:body]
50
+ raise ServerError, ex.response.body
55
51
  rescue Excon::Errors::Timeout => ex
56
- raise TimeoutError, ex.message
52
+ raise TimeoutError, ex.response.body
53
+ end
54
+
55
+ def log_request(request)
56
+ if Docker.logger
57
+ Docker.logger.debug(
58
+ [request[:method], request[:path], request[:query], request[:body]]
59
+ )
60
+ end
57
61
  end
58
62
 
59
63
  # Delegate all HTTP methods to the #request.
@@ -1,6 +1,6 @@
1
1
  module Docker
2
2
  # The version of the docker-api gem.
3
- VERSION = '1.21.0'
3
+ VERSION = '1.21.1'
4
4
 
5
5
  # The version of the compatible Docker remote API.
6
6
  API_VERSION = '1.16'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swipely, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-07 00:00:00.000000000 Z
11
+ date: 2015-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon