docker-api 1.7.2 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -32,6 +32,8 @@ Usage
32
32
 
33
33
  docker-api is designed to be very lightweight. Almost no state is cached (aside from id's which are immutable) to ensure that each method call's information is up to date. As such, just about every extrenal method represents an API call.
34
34
 
35
+ If you're just looking to build Docker images, [dockly](https://github.com/swipely/dockly) provides a simple syntax for building and packaging images.
36
+
35
37
  ## Starting up
36
38
 
37
39
  Follow the [installation instructions](http://www.docker.io/gettingstarted/), and then run:
data/lib/docker/image.rb CHANGED
@@ -19,7 +19,7 @@ class Docker::Image
19
19
  # necessary, but it will fail with 500 if no config is saved with the image
20
20
  def run(cmd=nil)
21
21
  opts = { 'Image' => self.id }
22
- opts["Cmd"] = cmd.split(/\s+/) if cmd.is_a?(String)
22
+ opts["Cmd"] = cmd.is_a?(String) ? cmd.split(/\s+/) : cmd
23
23
  begin
24
24
  Docker::Container.create(opts, connection)
25
25
  .tap(&:start!)
@@ -1,6 +1,6 @@
1
1
  module Docker
2
2
  # The version of the docker-api gem.
3
- VERSION = '1.7.2'
3
+ VERSION = '1.7.3'
4
4
 
5
5
  # The version of the compatible Docker remote API.
6
6
  API_VERSION = '1.6'
@@ -150,7 +150,7 @@ describe Docker::Image do
150
150
  end
151
151
 
152
152
  context 'when the argument is an Array' do
153
- let(:cmd) { %[which pwd] }
153
+ let(:cmd) { %w[which pwd] }
154
154
 
155
155
  it 'creates a new Container', :vcr do
156
156
  expect(output).to eq([["/bin/pwd\n"],[]])
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - Swipely/Docker-API 1.6.0
11
+ - Swipely/Docker-API 1.7.2
12
12
  Content-Type:
13
13
  - text/plain
14
14
  response:
@@ -21,7 +21,7 @@ http_interactions:
21
21
  YXBwbGljYXRpb24vanNvbg==
22
22
  !binary "RGF0ZQ==":
23
23
  - !binary |-
24
- V2VkLCAzMCBPY3QgMjAxMyAxNjo1ODo1NyBHTVQ=
24
+ V2VkLCAyMCBOb3YgMjAxMyAxNzo1OTozNyBHTVQ=
25
25
  !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
26
26
  - !binary |-
27
27
  Y2h1bmtlZA==
@@ -32,7 +32,7 @@ http_interactions:
32
32
  (ubuntu-quantl) from base, endpoint: https://cdn-registry-1.docker.io/v1/","id":"b750fe79269d"}{"status":"Pulling","progress":"dependend
33
33
  layers","id":"b750fe79269d"}{"status":"Download","progress":"complete","id":"b750fe79269d"}{"status":"Download","progress":"complete","id":"27cf78414709"}{"status":"Download","progress":"complete","id":"b750fe79269d"}'
34
34
  http_version:
35
- recorded_at: Wed, 30 Oct 2013 16:58:58 GMT
35
+ recorded_at: Wed, 20 Nov 2013 17:59:38 GMT
36
36
  - request:
37
37
  method: post
38
38
  uri: unix:///var/run/docker.sock/v1.6/containers/create
@@ -41,7 +41,7 @@ http_interactions:
41
41
  string: ! '{"Image":"base","Cmd":["which","pwd"]}'
42
42
  headers:
43
43
  User-Agent:
44
- - Swipely/Docker-API 1.6.0
44
+ - Swipely/Docker-API 1.7.2
45
45
  Content-Type:
46
46
  - application/json
47
47
  response:
@@ -52,26 +52,26 @@ http_interactions:
52
52
  !binary "Q29udGVudC1UeXBl":
53
53
  - !binary |-
54
54
  YXBwbGljYXRpb24vanNvbg==
55
+ !binary "RGF0ZQ==":
56
+ - !binary |-
57
+ V2VkLCAyMCBOb3YgMjAxMyAxNzo1OTozOCBHTVQ=
55
58
  !binary "Q29udGVudC1MZW5ndGg=":
56
59
  - !binary |-
57
60
  MjE=
58
- !binary "RGF0ZQ==":
59
- - !binary |-
60
- V2VkLCAzMCBPY3QgMjAxMyAxNjo1ODo1OCBHTVQ=
61
61
  body:
62
62
  encoding: US-ASCII
63
- string: ! '{"Id":"fb03cde2fcfb"}'
63
+ string: ! '{"Id":"616ec71eddd3"}'
64
64
  http_version:
65
- recorded_at: Wed, 30 Oct 2013 16:58:58 GMT
65
+ recorded_at: Wed, 20 Nov 2013 17:59:38 GMT
66
66
  - request:
67
67
  method: post
68
- uri: unix:///var/run/docker.sock/v1.6/containers/fb03cde2fcfb/start
68
+ uri: unix:///var/run/docker.sock/v1.6/containers/616ec71eddd3/start
69
69
  body:
70
70
  encoding: UTF-8
71
71
  string: ! '{}'
72
72
  headers:
73
73
  User-Agent:
74
- - Swipely/Docker-API 1.6.0
74
+ - Swipely/Docker-API 1.7.2
75
75
  Content-Type:
76
76
  - application/json
77
77
  response:
@@ -79,29 +79,29 @@ http_interactions:
79
79
  code: 204
80
80
  message:
81
81
  headers:
82
- !binary "Q29udGVudC1UeXBl":
82
+ !binary "RGF0ZQ==":
83
83
  - !binary |-
84
- dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
84
+ V2VkLCAyMCBOb3YgMjAxMyAxNzo1OTozOCBHTVQ=
85
85
  !binary "Q29udGVudC1MZW5ndGg=":
86
86
  - !binary |-
87
87
  MA==
88
- !binary "RGF0ZQ==":
88
+ !binary "Q29udGVudC1UeXBl":
89
89
  - !binary |-
90
- V2VkLCAzMCBPY3QgMjAxMyAxNjo1ODo1OCBHTVQ=
90
+ dGV4dC9wbGFpbjsgY2hhcnNldD11dGYtOA==
91
91
  body:
92
92
  encoding: US-ASCII
93
93
  string: ''
94
94
  http_version:
95
- recorded_at: Wed, 30 Oct 2013 16:58:58 GMT
95
+ recorded_at: Wed, 20 Nov 2013 17:59:38 GMT
96
96
  - request:
97
97
  method: post
98
- uri: unix:///var/run/docker.sock/v1.6/containers/fb03cde2fcfb/attach?stderr=true&stdout=true&stream=true
98
+ uri: unix:///var/run/docker.sock/v1.6/containers/616ec71eddd3/attach?stderr=true&stdout=true&stream=true
99
99
  body:
100
100
  encoding: US-ASCII
101
101
  string: ''
102
102
  headers:
103
103
  User-Agent:
104
- - Swipely/Docker-API 1.6.0
104
+ - Swipely/Docker-API 1.7.2
105
105
  Content-Type:
106
106
  - text/plain
107
107
  response:
@@ -117,5 +117,5 @@ http_interactions:
117
117
  string: !binary |-
118
118
  AQAAAAAAAAkvYmluL3B3ZAo=
119
119
  http_version:
120
- recorded_at: Wed, 30 Oct 2013 16:58:58 GMT
121
- recorded_with: VCR 2.6.0
120
+ recorded_at: Wed, 20 Nov 2013 17:59:38 GMT
121
+ recorded_with: VCR 2.7.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.2
4
+ version: 1.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-08 00:00:00.000000000 Z
12
+ date: 2013-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon