docker-api 1.23.0 → 1.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.cane +1 -1
  3. data/.rspec +1 -0
  4. data/.travis.yml +7 -6
  5. data/Dockerfile +2 -0
  6. data/README.md +5 -5
  7. data/Rakefile +26 -31
  8. data/TESTING.md +7 -19
  9. data/docker-api.gemspec +0 -1
  10. data/lib/docker/image.rb +6 -2
  11. data/lib/docker/version.rb +1 -1
  12. data/spec/docker/container_spec.rb +72 -92
  13. data/spec/docker/event_spec.rb +33 -23
  14. data/spec/docker/exec_spec.rb +9 -24
  15. data/spec/docker/image_spec.rb +75 -81
  16. data/spec/docker_spec.rb +21 -32
  17. metadata +4 -200
  18. data/spec/support/vcr.rb +0 -14
  19. data/spec/vcr/Docker/_authenticate_/with_valid_credentials/logs_in_and_sets_the_creds.yml +0 -32
  20. data/spec/vcr/Docker/_info/returns_the_info_as_a_Hash.yml +0 -39
  21. data/spec/vcr/Docker/_validate_version/when_nothing_is_raised/validate_version_/.yml +0 -39
  22. data/spec/vcr/Docker/_version/returns_the_version_as_a_Hash.yml +0 -34
  23. data/spec/vcr/Docker_Container/_all/when_the_HTTP_response_is_a_200/materializes_each_Container_into_a_Docker_Container.yml +0 -125
  24. data/spec/vcr/Docker_Container/_attach/with_normal_sized_chunks/yields_each_chunk.yml +0 -125
  25. data/spec/vcr/Docker_Container/_attach/with_very_small_chunks/yields_each_chunk.yml +0 -125
  26. data/spec/vcr/Docker_Container/_changes/returns_the_changes_as_an_array.yml +0 -165
  27. data/spec/vcr/Docker_Container/_commit/creates_a_new_Image_from_the_Container_s_changes.yml +0 -165
  28. data/spec/vcr/Docker_Container/_copy/when_the_file_does_not_exist/raises_an_error.yml +0 -136
  29. data/spec/vcr/Docker_Container/_copy/when_the_input_is_a_directory/yields_each_chunk_of_the_tarred_directory.yml +0 -241
  30. data/spec/vcr/Docker_Container/_copy/when_the_input_is_a_file/yields_each_chunk_of_the_tarred_file.yml +0 -198
  31. data/spec/vcr/Docker_Container/_create/when_creating_a_container_named_bob/should_have_name_set_to_bob.yml +0 -84
  32. data/spec/vcr/Docker_Container/_create/when_the_Container_does_not_yet_exist/when_the_HTTP_request_returns_a_200/sets_the_id.yml +0 -55
  33. data/spec/vcr/Docker_Container/_delete/deletes_the_container.yml +0 -85
  34. data/spec/vcr/Docker_Container/_exec/when_detach_is_true/returns_the_Docker_Exec_object.yml +0 -180
  35. data/spec/vcr/Docker_Container/_exec/when_passed_a_block/streams_the_stdout/stderr_messages.yml +0 -183
  36. data/spec/vcr/Docker_Container/_exec/when_passed_only_a_command/returns_the_stdout/stderr_messages_and_exit_code.yml +0 -183
  37. data/spec/vcr/Docker_Container/_exec/when_stdin_object_is_passed/returns_the_stdout/stderr_messages.yml +0 -101
  38. data/spec/vcr/Docker_Container/_exec/when_tty_is_true/returns_the_raw_stdout/stderr_output.yml +0 -182
  39. data/spec/vcr/Docker_Container/_export/yields_each_chunk.yml +0 -333
  40. data/spec/vcr/Docker_Container/_get/when_the_HTTP_response_is_a_200/materializes_the_Container_into_a_Docker_Container.yml +0 -84
  41. data/spec/vcr/Docker_Container/_json/returns_the_description_as_a_Hash.yml +0 -84
  42. data/spec/vcr/Docker_Container/_kill/kills_the_container.yml +0 -164
  43. data/spec/vcr/Docker_Container/_kill/with_a_kill_signal/kills_the_container.yml +0 -257
  44. data/spec/vcr/Docker_Container/_logs/when_not_selecting_any_stream/raises_a_client_error.yml +0 -171
  45. data/spec/vcr/Docker_Container/_logs/when_selecting_stdout/returns_blank_logs.yml +0 -82
  46. data/spec/vcr/Docker_Container/_pause/pauses_the_container.yml +0 -176
  47. data/spec/vcr/Docker_Container/_rename/renames_the_container.yml +0 -149
  48. data/spec/vcr/Docker_Container/_restart/restarts_the_container.yml +0 -243
  49. data/spec/vcr/Docker_Container/_run/when_the_Container_s_command_does_not_return_status_code_of_0/raises_an_error.yml +0 -107
  50. data/spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/creates_a_new_container_to_run_the_specified_command.yml +0 -392
  51. data/spec/vcr/Docker_Container/_start/starts_the_container.yml +0 -140
  52. data/spec/vcr/Docker_Container/_stop/stops_the_container.yml +0 -164
  53. data/spec/vcr/Docker_Container/_streaming_logs/when_not_selecting_any_stream/raises_a_client_error.yml +0 -217
  54. data/spec/vcr/Docker_Container/_streaming_logs/when_passing_a_block/returns_hello_.yml +0 -131
  55. data/spec/vcr/Docker_Container/_streaming_logs/when_selecting_stdout/returns_blank_logs.yml +0 -131
  56. data/spec/vcr/Docker_Container/_streaming_logs/when_using_a_tty/returns_hello_.yml +0 -131
  57. data/spec/vcr/Docker_Container/_top/returns_the_top_commands_as_an_Array.yml +0 -194
  58. data/spec/vcr/Docker_Container/_unpause/unpauses_the_container.yml +0 -176
  59. data/spec/vcr/Docker_Container/_wait/waits_for_the_command_to_finish.yml +0 -107
  60. data/spec/vcr/Docker_Container/_wait/when_an_argument_is_given/sets_the_read_timeout_to_that_amount_of_time.yml +0 -107
  61. data/spec/vcr/Docker_Exec/_create/when_the_HTTP_request_returns_a_201/sets_the_id.yml +0 -130
  62. data/spec/vcr/Docker_Exec/_json/returns_the_description_as_a_Hash.yml +0 -207
  63. data/spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_false/block_is_passed/attaches_to_the_stream.yml +0 -182
  64. data/spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_false/returns_the_stdout_and_stderr_messages.yml +0 -182
  65. data/spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_true/returns_empty_stdout/stderr_messages_with_exitcode.yml +0 -180
  66. data/spec/vcr/Docker_Exec/_start_/when_the_HTTP_request_returns_a_201/starts_the_exec_instance.yml +0 -180
  67. data/spec/vcr/Docker_Exec/_start_/when_the_command_has_already_run/raises_an_error.yml +0 -180
  68. data/spec/vcr/Docker_Exec/_start_/when_wait_set_long_time_value/returns_empty_stdout_and_stderr_messages_with_exitcode.yml +0 -189
  69. data/spec/vcr/Docker_Image/_all/materializes_each_Image_into_a_Docker_Image.yml +0 -111
  70. data/spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/with_a_block_capturing_build_output/calls_the_block_and_passes_build_output.yml +0 -75
  71. data/spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/with_specifying_a_repo_in_the_query_parameters/builds_an_image_and_tags_it.yml +0 -219
  72. data/spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/without_query_parameters/builds_an_image.yml +0 -75
  73. data/spec/vcr/Docker_Image/_build/with_an_invalid_Dockerfile/throws_a_UnexpectedResponseError.yml +0 -79
  74. data/spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_a_block_capturing_build_output/calls_the_block_and_passes_build_output.yml +0 -194
  75. data/spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_a_block_capturing_build_output/uses_a_cached_version_the_second_time/calls_the_block_and_passes_build_output.yml +0 -96
  76. data/spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_credentials_passed/sends_X-Registry-Config_header.yml +0 -194
  77. data/spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_no_query_parameters/builds_the_image.yml +0 -562
  78. data/spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_specifying_a_repo_in_the_query_parameters/builds_the_image_and_tags_it.yml +0 -601
  79. data/spec/vcr/Docker_Image/_create/when_the_Image_does_not_yet_exist_and_the_body_is_a_Hash/sets_the_id_and_sends_Docker_creds.yml +0 -65
  80. data/spec/vcr/Docker_Image/_create/with_a_block_capturing_create_output/calls_the_block_and_passes_build_output.yml +0 -38
  81. data/spec/vcr/Docker_Image/_exist_/when_the_image_does_exist/returns_true.yml +0 -33
  82. data/spec/vcr/Docker_Image/_get/when_the_image_does_exist/returns_the_new_image.yml +0 -33
  83. data/spec/vcr/Docker_Image/_history/returns_the_history_of_the_Image.yml +0 -66
  84. data/spec/vcr/Docker_Image/_import/when_the_argument_is_a_URI/when_the_URI_is_invalid/raises_an_error.yml +0 -265
  85. data/spec/vcr/Docker_Image/_import/when_the_argument_is_a_URI/when_the_URI_is_valid/returns_an_Image.yml +0 -303
  86. data/spec/vcr/Docker_Image/_import/when_the_file_does_exist/creates_the_Image.yml +0 -59
  87. data/spec/vcr/Docker_Image/_insert_local/when_a_direcory_is_passed/inserts_the_directory.yml +0 -1469
  88. data/spec/vcr/Docker_Image/_insert_local/when_removing_intermediate_containers/creates_a_new_image.yml +0 -244
  89. data/spec/vcr/Docker_Image/_insert_local/when_removing_intermediate_containers/leave_no_intermediate_containers.yml +0 -224
  90. data/spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_exist/creates_a_new_Image_that_has_that_file.yml +0 -289
  91. data/spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_not_exist/raises_an_error.yml +0 -32
  92. data/spec/vcr/Docker_Image/_insert_local/when_there_are_multiple_files_passed/creates_a_new_Image_that_has_each_file.yml +0 -366
  93. data/spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml +0 -62
  94. data/spec/vcr/Docker_Image/_push/pushes_the_Image.yml +0 -246
  95. data/spec/vcr/Docker_Image/_push/streams_output_from_push.yml +0 -246
  96. data/spec/vcr/Docker_Image/_push/when_the_image_was_retrived_by_get/when_no_tag_is_specified/looks_up_the_first_repo_tag.yml +0 -382
  97. data/spec/vcr/Docker_Image/_push/when_there_are_no_credentials/still_pushes.yml +0 -264
  98. data/spec/vcr/Docker_Image/_refresh_/updates_the_info_hash.yml +0 -141
  99. data/spec/vcr/Docker_Image/_refresh_/with_an_explicit_connection/updates_using_the_provided_connection.yml +0 -62
  100. data/spec/vcr/Docker_Image/_remove/when_no_name_is_given/removes_the_Image.yml +0 -652
  101. data/spec/vcr/Docker_Image/_run/when_the_argument_is_a_String/splits_the_String_by_spaces_and_creates_a_new_Container.yml +0 -162
  102. data/spec/vcr/Docker_Image/_run/when_the_argument_is_an_Array/creates_a_new_Container.yml +0 -162
  103. data/spec/vcr/Docker_Image/_run/when_the_argument_is_nil/command_configured_in_image/should_normally_show_result_if_image_has_Cmd_configured.yml +0 -162
  104. data/spec/vcr/Docker_Image/_run/when_the_argument_is_nil/no_command_configured_in_image/should_raise_an_error_if_no_command_is_specified.yml +0 -63
  105. data/spec/vcr/Docker_Image/_save/calls_the_class_method.yml +0 -67
  106. data/spec/vcr/Docker_Image/_save/when_a_filename_is_specified/exports_tarball_of_image_to_specified_file.yml +0 -176
  107. data/spec/vcr/Docker_Image/_save/when_no_filename_is_specified/returns_raw_binary_data_as_string.yml +0 -176
  108. data/spec/vcr/Docker_Image/_search/materializes_each_Image_into_a_Docker_Image.yml +0 -79
  109. data/spec/vcr/Docker_Image/_tag/tags_the_image_with_the_repo_name.yml +0 -88
data/spec/docker_spec.rb CHANGED
@@ -13,6 +13,7 @@ describe Docker do
13
13
  allow(ENV).to receive(:[]).with('DOCKER_CERT_PATH').and_return(nil)
14
14
  Docker.reset!
15
15
  end
16
+ after { Docker.reset! }
16
17
 
17
18
  its(:options) { should == {} }
18
19
  its(:url) { should == 'unix:///var/run/docker.sock' }
@@ -27,6 +28,7 @@ describe Docker do
27
28
  allow(ENV).to receive(:[]).with('DOCKER_CERT_PATH').and_return(nil)
28
29
  Docker.reset!
29
30
  end
31
+ after { Docker.reset! }
30
32
 
31
33
  its(:options) { should == {} }
32
34
  its(:url) { should == 'unixs:///var/run/not-docker.sock' }
@@ -40,6 +42,7 @@ describe Docker do
40
42
  allow(ENV).to receive(:[]).with('DOCKER_CERT_PATH').and_return(nil)
41
43
  Docker.reset!
42
44
  end
45
+ after { Docker.reset! }
43
46
 
44
47
  its(:options) { should == {} }
45
48
  its(:url) { should == 'tcp://localhost:2375' }
@@ -54,6 +57,7 @@ describe Docker do
54
57
  allow(ENV).to receive(:[]).with('DOCKER_CERT_PATH').and_return(nil)
55
58
  Docker.reset!
56
59
  end
60
+ after { Docker.reset! }
57
61
 
58
62
  its(:options) { should == {} }
59
63
  its(:url) { should == 'tcp://someserver:8103' }
@@ -69,6 +73,7 @@ describe Docker do
69
73
  allow(ENV).to receive(:[]).with('DOCKER_CERT_PATH').and_return(nil)
70
74
  Docker.reset!
71
75
  end
76
+ after { Docker.reset! }
72
77
 
73
78
  its(:options) { should == {} }
74
79
  its(:url) { should == 'tcp://someotherserver:8103' }
@@ -85,6 +90,7 @@ describe Docker do
85
90
  allow(ENV).to receive(:[]).with('DOCKER_SSL_VERIFY').and_return(nil)
86
91
  Docker.reset!
87
92
  end
93
+ after { Docker.reset! }
88
94
 
89
95
  its(:options) {
90
96
  should == {
@@ -109,6 +115,7 @@ describe Docker do
109
115
  .and_return('false')
110
116
  Docker.reset!
111
117
  end
118
+ after { Docker.reset! }
112
119
 
113
120
  its(:options) {
114
121
  should == {
@@ -136,39 +143,31 @@ describe Docker do
136
143
 
137
144
  [:options=, :url=].each do |method|
138
145
  describe "##{method}" do
139
- before do
140
- subject.url = nil
141
- subject.options = nil
142
- end
146
+ before { Docker.reset! }
143
147
 
144
148
  it 'calls #reset_connection!' do
145
149
  expect(subject).to receive(:reset_connection!)
146
- subject.public_send(method, {})
150
+ subject.public_send(method, nil)
147
151
  end
148
152
  end
149
153
  end
150
154
 
151
155
  describe '#version' do
152
- before do
153
- subject.url = nil
154
- subject.options = nil
155
- end
156
+ before { Docker.reset! }
157
+
156
158
  let(:expected) {
157
159
  %w[ApiVersion Arch GitCommit GoVersion KernelVersion Os Version]
158
160
  }
159
161
 
160
162
  let(:version) { subject.version }
161
- it 'returns the version as a Hash', :vcr do
163
+ it 'returns the version as a Hash' do
162
164
  expect(version).to be_a Hash
163
- expect(version.keys.sort).to eq expected
165
+ expect(version.keys.sort).to include(*expected)
164
166
  end
165
167
  end
166
168
 
167
169
  describe '#info' do
168
- before do
169
- subject.url = nil
170
- subject.options = nil
171
- end
170
+ before { Docker.reset! }
172
171
 
173
172
  let(:info) { subject.info }
174
173
  let(:keys) do
@@ -178,9 +177,9 @@ describe Docker do
178
177
  NGoroutines Name OperatingSystem SwapLimit)
179
178
  end
180
179
 
181
- it 'returns the info as a Hash', :vcr do
180
+ it 'returns the info as a Hash' do
182
181
  expect(info).to be_a Hash
183
- expect(info.keys.sort).to eq keys
182
+ expect(info.keys.sort).to include(*keys)
184
183
  end
185
184
  end
186
185
 
@@ -191,13 +190,9 @@ describe Docker do
191
190
  subject.authenticate!(credentials)
192
191
  }
193
192
 
194
- after do
195
- Docker.creds = nil
196
- end
193
+ after { Docker.creds = nil }
197
194
 
198
195
  context 'with valid credentials' do
199
- # Used valid credentials to record VCR and then changed
200
- # cassette to match these credentials
201
196
  let(:credentials) {
202
197
  {
203
198
  :username => ENV['DOCKER_API_USER'],
@@ -207,15 +202,13 @@ describe Docker do
207
202
  }
208
203
  }
209
204
 
210
- it 'logs in and sets the creds', :vcr do
205
+ it 'logs in and sets the creds' do
211
206
  expect(authentication).to be true
212
207
  expect(Docker.creds).to eq(credentials.to_json)
213
208
  end
214
209
  end
215
210
 
216
211
  context 'with invalid credentials' do
217
- # Recorded the VCR with these credentials
218
- # to purposely fail
219
212
  let(:credentials) {
220
213
  {
221
214
  :username => 'test',
@@ -225,8 +218,7 @@ describe Docker do
225
218
  }
226
219
  }
227
220
 
228
- it "raises an error and doesn't set the creds", :vcr do
229
- skip "VCR won't record when Excon::Expects fail"
221
+ it "raises an error and doesn't set the creds" do
230
222
  expect {
231
223
  authentication
232
224
  }.to raise_error(Docker::Error::AuthenticationError)
@@ -236,10 +228,7 @@ describe Docker do
236
228
  end
237
229
 
238
230
  describe '#validate_version' do
239
- before do
240
- subject.url = nil
241
- subject.options = nil
242
- end
231
+ before { Docker.reset! }
243
232
 
244
233
  context 'when a Docker Error is raised' do
245
234
  before do
@@ -252,7 +241,7 @@ describe Docker do
252
241
  end
253
242
  end
254
243
 
255
- context 'when nothing is raised', :vcr do
244
+ context 'when nothing is raised' do
256
245
  its(:validate_version!) { should be true }
257
246
  end
258
247
  end
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.23.0
4
+ version: 1.24.0
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-11-11 00:00:00.000000000 Z
11
+ date: 2015-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: vcr
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: 2.7.0
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: 2.7.0
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: simplecov
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -175,8 +161,10 @@ extra_rdoc_files: []
175
161
  files:
176
162
  - ".cane"
177
163
  - ".gitignore"
164
+ - ".rspec"
178
165
  - ".simplecov"
179
166
  - ".travis.yml"
167
+ - Dockerfile
180
168
  - Gemfile
181
169
  - LICENSE
182
170
  - README.md
@@ -211,98 +199,6 @@ files:
211
199
  - spec/fixtures/export.tar
212
200
  - spec/fixtures/top/Dockerfile
213
201
  - spec/spec_helper.rb
214
- - spec/support/vcr.rb
215
- - spec/vcr/Docker/_authenticate_/with_valid_credentials/logs_in_and_sets_the_creds.yml
216
- - spec/vcr/Docker/_info/returns_the_info_as_a_Hash.yml
217
- - spec/vcr/Docker/_validate_version/when_nothing_is_raised/validate_version_/.yml
218
- - spec/vcr/Docker/_version/returns_the_version_as_a_Hash.yml
219
- - spec/vcr/Docker_Container/_all/when_the_HTTP_response_is_a_200/materializes_each_Container_into_a_Docker_Container.yml
220
- - spec/vcr/Docker_Container/_attach/with_normal_sized_chunks/yields_each_chunk.yml
221
- - spec/vcr/Docker_Container/_attach/with_very_small_chunks/yields_each_chunk.yml
222
- - spec/vcr/Docker_Container/_changes/returns_the_changes_as_an_array.yml
223
- - spec/vcr/Docker_Container/_commit/creates_a_new_Image_from_the_Container_s_changes.yml
224
- - spec/vcr/Docker_Container/_copy/when_the_file_does_not_exist/raises_an_error.yml
225
- - spec/vcr/Docker_Container/_copy/when_the_input_is_a_directory/yields_each_chunk_of_the_tarred_directory.yml
226
- - spec/vcr/Docker_Container/_copy/when_the_input_is_a_file/yields_each_chunk_of_the_tarred_file.yml
227
- - spec/vcr/Docker_Container/_create/when_creating_a_container_named_bob/should_have_name_set_to_bob.yml
228
- - spec/vcr/Docker_Container/_create/when_the_Container_does_not_yet_exist/when_the_HTTP_request_returns_a_200/sets_the_id.yml
229
- - spec/vcr/Docker_Container/_delete/deletes_the_container.yml
230
- - spec/vcr/Docker_Container/_exec/when_detach_is_true/returns_the_Docker_Exec_object.yml
231
- - spec/vcr/Docker_Container/_exec/when_passed_a_block/streams_the_stdout/stderr_messages.yml
232
- - spec/vcr/Docker_Container/_exec/when_passed_only_a_command/returns_the_stdout/stderr_messages_and_exit_code.yml
233
- - spec/vcr/Docker_Container/_exec/when_stdin_object_is_passed/returns_the_stdout/stderr_messages.yml
234
- - spec/vcr/Docker_Container/_exec/when_tty_is_true/returns_the_raw_stdout/stderr_output.yml
235
- - spec/vcr/Docker_Container/_export/yields_each_chunk.yml
236
- - spec/vcr/Docker_Container/_get/when_the_HTTP_response_is_a_200/materializes_the_Container_into_a_Docker_Container.yml
237
- - spec/vcr/Docker_Container/_json/returns_the_description_as_a_Hash.yml
238
- - spec/vcr/Docker_Container/_kill/kills_the_container.yml
239
- - spec/vcr/Docker_Container/_kill/with_a_kill_signal/kills_the_container.yml
240
- - spec/vcr/Docker_Container/_logs/when_not_selecting_any_stream/raises_a_client_error.yml
241
- - spec/vcr/Docker_Container/_logs/when_selecting_stdout/returns_blank_logs.yml
242
- - spec/vcr/Docker_Container/_pause/pauses_the_container.yml
243
- - spec/vcr/Docker_Container/_rename/renames_the_container.yml
244
- - spec/vcr/Docker_Container/_restart/restarts_the_container.yml
245
- - spec/vcr/Docker_Container/_run/when_the_Container_s_command_does_not_return_status_code_of_0/raises_an_error.yml
246
- - spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/creates_a_new_container_to_run_the_specified_command.yml
247
- - spec/vcr/Docker_Container/_start/starts_the_container.yml
248
- - spec/vcr/Docker_Container/_stop/stops_the_container.yml
249
- - spec/vcr/Docker_Container/_streaming_logs/when_not_selecting_any_stream/raises_a_client_error.yml
250
- - spec/vcr/Docker_Container/_streaming_logs/when_passing_a_block/returns_hello_.yml
251
- - spec/vcr/Docker_Container/_streaming_logs/when_selecting_stdout/returns_blank_logs.yml
252
- - spec/vcr/Docker_Container/_streaming_logs/when_using_a_tty/returns_hello_.yml
253
- - spec/vcr/Docker_Container/_top/returns_the_top_commands_as_an_Array.yml
254
- - spec/vcr/Docker_Container/_unpause/unpauses_the_container.yml
255
- - spec/vcr/Docker_Container/_wait/waits_for_the_command_to_finish.yml
256
- - spec/vcr/Docker_Container/_wait/when_an_argument_is_given/sets_the_read_timeout_to_that_amount_of_time.yml
257
- - spec/vcr/Docker_Exec/_create/when_the_HTTP_request_returns_a_201/sets_the_id.yml
258
- - spec/vcr/Docker_Exec/_json/returns_the_description_as_a_Hash.yml
259
- - spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_false/block_is_passed/attaches_to_the_stream.yml
260
- - spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_false/returns_the_stdout_and_stderr_messages.yml
261
- - spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_true/returns_empty_stdout/stderr_messages_with_exitcode.yml
262
- - spec/vcr/Docker_Exec/_start_/when_the_HTTP_request_returns_a_201/starts_the_exec_instance.yml
263
- - spec/vcr/Docker_Exec/_start_/when_the_command_has_already_run/raises_an_error.yml
264
- - spec/vcr/Docker_Exec/_start_/when_wait_set_long_time_value/returns_empty_stdout_and_stderr_messages_with_exitcode.yml
265
- - spec/vcr/Docker_Image/_all/materializes_each_Image_into_a_Docker_Image.yml
266
- - spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/with_a_block_capturing_build_output/calls_the_block_and_passes_build_output.yml
267
- - spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/with_specifying_a_repo_in_the_query_parameters/builds_an_image_and_tags_it.yml
268
- - spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/without_query_parameters/builds_an_image.yml
269
- - spec/vcr/Docker_Image/_build/with_an_invalid_Dockerfile/throws_a_UnexpectedResponseError.yml
270
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_a_block_capturing_build_output/calls_the_block_and_passes_build_output.yml
271
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_a_block_capturing_build_output/uses_a_cached_version_the_second_time/calls_the_block_and_passes_build_output.yml
272
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_credentials_passed/sends_X-Registry-Config_header.yml
273
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_no_query_parameters/builds_the_image.yml
274
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_specifying_a_repo_in_the_query_parameters/builds_the_image_and_tags_it.yml
275
- - spec/vcr/Docker_Image/_create/when_the_Image_does_not_yet_exist_and_the_body_is_a_Hash/sets_the_id_and_sends_Docker_creds.yml
276
- - spec/vcr/Docker_Image/_create/with_a_block_capturing_create_output/calls_the_block_and_passes_build_output.yml
277
- - spec/vcr/Docker_Image/_exist_/when_the_image_does_exist/returns_true.yml
278
- - spec/vcr/Docker_Image/_get/when_the_image_does_exist/returns_the_new_image.yml
279
- - spec/vcr/Docker_Image/_history/returns_the_history_of_the_Image.yml
280
- - spec/vcr/Docker_Image/_import/when_the_argument_is_a_URI/when_the_URI_is_invalid/raises_an_error.yml
281
- - spec/vcr/Docker_Image/_import/when_the_argument_is_a_URI/when_the_URI_is_valid/returns_an_Image.yml
282
- - spec/vcr/Docker_Image/_import/when_the_file_does_exist/creates_the_Image.yml
283
- - spec/vcr/Docker_Image/_insert_local/when_a_direcory_is_passed/inserts_the_directory.yml
284
- - spec/vcr/Docker_Image/_insert_local/when_removing_intermediate_containers/creates_a_new_image.yml
285
- - spec/vcr/Docker_Image/_insert_local/when_removing_intermediate_containers/leave_no_intermediate_containers.yml
286
- - spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_exist/creates_a_new_Image_that_has_that_file.yml
287
- - spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_not_exist/raises_an_error.yml
288
- - spec/vcr/Docker_Image/_insert_local/when_there_are_multiple_files_passed/creates_a_new_Image_that_has_each_file.yml
289
- - spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml
290
- - spec/vcr/Docker_Image/_push/pushes_the_Image.yml
291
- - spec/vcr/Docker_Image/_push/streams_output_from_push.yml
292
- - spec/vcr/Docker_Image/_push/when_the_image_was_retrived_by_get/when_no_tag_is_specified/looks_up_the_first_repo_tag.yml
293
- - spec/vcr/Docker_Image/_push/when_there_are_no_credentials/still_pushes.yml
294
- - spec/vcr/Docker_Image/_refresh_/updates_the_info_hash.yml
295
- - spec/vcr/Docker_Image/_refresh_/with_an_explicit_connection/updates_using_the_provided_connection.yml
296
- - spec/vcr/Docker_Image/_remove/when_no_name_is_given/removes_the_Image.yml
297
- - spec/vcr/Docker_Image/_run/when_the_argument_is_a_String/splits_the_String_by_spaces_and_creates_a_new_Container.yml
298
- - spec/vcr/Docker_Image/_run/when_the_argument_is_an_Array/creates_a_new_Container.yml
299
- - spec/vcr/Docker_Image/_run/when_the_argument_is_nil/command_configured_in_image/should_normally_show_result_if_image_has_Cmd_configured.yml
300
- - spec/vcr/Docker_Image/_run/when_the_argument_is_nil/no_command_configured_in_image/should_raise_an_error_if_no_command_is_specified.yml
301
- - spec/vcr/Docker_Image/_save/calls_the_class_method.yml
302
- - spec/vcr/Docker_Image/_save/when_a_filename_is_specified/exports_tarball_of_image_to_specified_file.yml
303
- - spec/vcr/Docker_Image/_save/when_no_filename_is_specified/returns_raw_binary_data_as_string.yml
304
- - spec/vcr/Docker_Image/_search/materializes_each_Image_into_a_Docker_Image.yml
305
- - spec/vcr/Docker_Image/_tag/tags_the_image_with_the_repo_name.yml
306
202
  homepage: https://github.com/swipely/docker-api
307
203
  licenses:
308
204
  - MIT
@@ -341,96 +237,4 @@ test_files:
341
237
  - spec/fixtures/export.tar
342
238
  - spec/fixtures/top/Dockerfile
343
239
  - spec/spec_helper.rb
344
- - spec/support/vcr.rb
345
- - spec/vcr/Docker/_authenticate_/with_valid_credentials/logs_in_and_sets_the_creds.yml
346
- - spec/vcr/Docker/_info/returns_the_info_as_a_Hash.yml
347
- - spec/vcr/Docker/_validate_version/when_nothing_is_raised/validate_version_/.yml
348
- - spec/vcr/Docker/_version/returns_the_version_as_a_Hash.yml
349
- - spec/vcr/Docker_Container/_all/when_the_HTTP_response_is_a_200/materializes_each_Container_into_a_Docker_Container.yml
350
- - spec/vcr/Docker_Container/_attach/with_normal_sized_chunks/yields_each_chunk.yml
351
- - spec/vcr/Docker_Container/_attach/with_very_small_chunks/yields_each_chunk.yml
352
- - spec/vcr/Docker_Container/_changes/returns_the_changes_as_an_array.yml
353
- - spec/vcr/Docker_Container/_commit/creates_a_new_Image_from_the_Container_s_changes.yml
354
- - spec/vcr/Docker_Container/_copy/when_the_file_does_not_exist/raises_an_error.yml
355
- - spec/vcr/Docker_Container/_copy/when_the_input_is_a_directory/yields_each_chunk_of_the_tarred_directory.yml
356
- - spec/vcr/Docker_Container/_copy/when_the_input_is_a_file/yields_each_chunk_of_the_tarred_file.yml
357
- - spec/vcr/Docker_Container/_create/when_creating_a_container_named_bob/should_have_name_set_to_bob.yml
358
- - spec/vcr/Docker_Container/_create/when_the_Container_does_not_yet_exist/when_the_HTTP_request_returns_a_200/sets_the_id.yml
359
- - spec/vcr/Docker_Container/_delete/deletes_the_container.yml
360
- - spec/vcr/Docker_Container/_exec/when_detach_is_true/returns_the_Docker_Exec_object.yml
361
- - spec/vcr/Docker_Container/_exec/when_passed_a_block/streams_the_stdout/stderr_messages.yml
362
- - spec/vcr/Docker_Container/_exec/when_passed_only_a_command/returns_the_stdout/stderr_messages_and_exit_code.yml
363
- - spec/vcr/Docker_Container/_exec/when_stdin_object_is_passed/returns_the_stdout/stderr_messages.yml
364
- - spec/vcr/Docker_Container/_exec/when_tty_is_true/returns_the_raw_stdout/stderr_output.yml
365
- - spec/vcr/Docker_Container/_export/yields_each_chunk.yml
366
- - spec/vcr/Docker_Container/_get/when_the_HTTP_response_is_a_200/materializes_the_Container_into_a_Docker_Container.yml
367
- - spec/vcr/Docker_Container/_json/returns_the_description_as_a_Hash.yml
368
- - spec/vcr/Docker_Container/_kill/kills_the_container.yml
369
- - spec/vcr/Docker_Container/_kill/with_a_kill_signal/kills_the_container.yml
370
- - spec/vcr/Docker_Container/_logs/when_not_selecting_any_stream/raises_a_client_error.yml
371
- - spec/vcr/Docker_Container/_logs/when_selecting_stdout/returns_blank_logs.yml
372
- - spec/vcr/Docker_Container/_pause/pauses_the_container.yml
373
- - spec/vcr/Docker_Container/_rename/renames_the_container.yml
374
- - spec/vcr/Docker_Container/_restart/restarts_the_container.yml
375
- - spec/vcr/Docker_Container/_run/when_the_Container_s_command_does_not_return_status_code_of_0/raises_an_error.yml
376
- - spec/vcr/Docker_Container/_run/when_the_Container_s_command_returns_a_status_code_of_0/creates_a_new_container_to_run_the_specified_command.yml
377
- - spec/vcr/Docker_Container/_start/starts_the_container.yml
378
- - spec/vcr/Docker_Container/_stop/stops_the_container.yml
379
- - spec/vcr/Docker_Container/_streaming_logs/when_not_selecting_any_stream/raises_a_client_error.yml
380
- - spec/vcr/Docker_Container/_streaming_logs/when_passing_a_block/returns_hello_.yml
381
- - spec/vcr/Docker_Container/_streaming_logs/when_selecting_stdout/returns_blank_logs.yml
382
- - spec/vcr/Docker_Container/_streaming_logs/when_using_a_tty/returns_hello_.yml
383
- - spec/vcr/Docker_Container/_top/returns_the_top_commands_as_an_Array.yml
384
- - spec/vcr/Docker_Container/_unpause/unpauses_the_container.yml
385
- - spec/vcr/Docker_Container/_wait/waits_for_the_command_to_finish.yml
386
- - spec/vcr/Docker_Container/_wait/when_an_argument_is_given/sets_the_read_timeout_to_that_amount_of_time.yml
387
- - spec/vcr/Docker_Exec/_create/when_the_HTTP_request_returns_a_201/sets_the_id.yml
388
- - spec/vcr/Docker_Exec/_json/returns_the_description_as_a_Hash.yml
389
- - spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_false/block_is_passed/attaches_to_the_stream.yml
390
- - spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_false/returns_the_stdout_and_stderr_messages.yml
391
- - spec/vcr/Docker_Exec/_start_/when_detach_is_set_to_true/returns_empty_stdout/stderr_messages_with_exitcode.yml
392
- - spec/vcr/Docker_Exec/_start_/when_the_HTTP_request_returns_a_201/starts_the_exec_instance.yml
393
- - spec/vcr/Docker_Exec/_start_/when_the_command_has_already_run/raises_an_error.yml
394
- - spec/vcr/Docker_Exec/_start_/when_wait_set_long_time_value/returns_empty_stdout_and_stderr_messages_with_exitcode.yml
395
- - spec/vcr/Docker_Image/_all/materializes_each_Image_into_a_Docker_Image.yml
396
- - spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/with_a_block_capturing_build_output/calls_the_block_and_passes_build_output.yml
397
- - spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/with_specifying_a_repo_in_the_query_parameters/builds_an_image_and_tags_it.yml
398
- - spec/vcr/Docker_Image/_build/with_a_valid_Dockerfile/without_query_parameters/builds_an_image.yml
399
- - spec/vcr/Docker_Image/_build/with_an_invalid_Dockerfile/throws_a_UnexpectedResponseError.yml
400
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_a_block_capturing_build_output/calls_the_block_and_passes_build_output.yml
401
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_a_block_capturing_build_output/uses_a_cached_version_the_second_time/calls_the_block_and_passes_build_output.yml
402
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_credentials_passed/sends_X-Registry-Config_header.yml
403
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_no_query_parameters/builds_the_image.yml
404
- - spec/vcr/Docker_Image/_build_from_dir/with_a_valid_Dockerfile/with_specifying_a_repo_in_the_query_parameters/builds_the_image_and_tags_it.yml
405
- - spec/vcr/Docker_Image/_create/when_the_Image_does_not_yet_exist_and_the_body_is_a_Hash/sets_the_id_and_sends_Docker_creds.yml
406
- - spec/vcr/Docker_Image/_create/with_a_block_capturing_create_output/calls_the_block_and_passes_build_output.yml
407
- - spec/vcr/Docker_Image/_exist_/when_the_image_does_exist/returns_true.yml
408
- - spec/vcr/Docker_Image/_get/when_the_image_does_exist/returns_the_new_image.yml
409
- - spec/vcr/Docker_Image/_history/returns_the_history_of_the_Image.yml
410
- - spec/vcr/Docker_Image/_import/when_the_argument_is_a_URI/when_the_URI_is_invalid/raises_an_error.yml
411
- - spec/vcr/Docker_Image/_import/when_the_argument_is_a_URI/when_the_URI_is_valid/returns_an_Image.yml
412
- - spec/vcr/Docker_Image/_import/when_the_file_does_exist/creates_the_Image.yml
413
- - spec/vcr/Docker_Image/_insert_local/when_a_direcory_is_passed/inserts_the_directory.yml
414
- - spec/vcr/Docker_Image/_insert_local/when_removing_intermediate_containers/creates_a_new_image.yml
415
- - spec/vcr/Docker_Image/_insert_local/when_removing_intermediate_containers/leave_no_intermediate_containers.yml
416
- - spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_exist/creates_a_new_Image_that_has_that_file.yml
417
- - spec/vcr/Docker_Image/_insert_local/when_the_local_file_does_not_exist/raises_an_error.yml
418
- - spec/vcr/Docker_Image/_insert_local/when_there_are_multiple_files_passed/creates_a_new_Image_that_has_each_file.yml
419
- - spec/vcr/Docker_Image/_json/returns_additional_information_about_image_image.yml
420
- - spec/vcr/Docker_Image/_push/pushes_the_Image.yml
421
- - spec/vcr/Docker_Image/_push/streams_output_from_push.yml
422
- - spec/vcr/Docker_Image/_push/when_the_image_was_retrived_by_get/when_no_tag_is_specified/looks_up_the_first_repo_tag.yml
423
- - spec/vcr/Docker_Image/_push/when_there_are_no_credentials/still_pushes.yml
424
- - spec/vcr/Docker_Image/_refresh_/updates_the_info_hash.yml
425
- - spec/vcr/Docker_Image/_refresh_/with_an_explicit_connection/updates_using_the_provided_connection.yml
426
- - spec/vcr/Docker_Image/_remove/when_no_name_is_given/removes_the_Image.yml
427
- - spec/vcr/Docker_Image/_run/when_the_argument_is_a_String/splits_the_String_by_spaces_and_creates_a_new_Container.yml
428
- - spec/vcr/Docker_Image/_run/when_the_argument_is_an_Array/creates_a_new_Container.yml
429
- - spec/vcr/Docker_Image/_run/when_the_argument_is_nil/command_configured_in_image/should_normally_show_result_if_image_has_Cmd_configured.yml
430
- - spec/vcr/Docker_Image/_run/when_the_argument_is_nil/no_command_configured_in_image/should_raise_an_error_if_no_command_is_specified.yml
431
- - spec/vcr/Docker_Image/_save/calls_the_class_method.yml
432
- - spec/vcr/Docker_Image/_save/when_a_filename_is_specified/exports_tarball_of_image_to_specified_file.yml
433
- - spec/vcr/Docker_Image/_save/when_no_filename_is_specified/returns_raw_binary_data_as_string.yml
434
- - spec/vcr/Docker_Image/_search/materializes_each_Image_into_a_Docker_Image.yml
435
- - spec/vcr/Docker_Image/_tag/tags_the_image_with_the_repo_name.yml
436
240
  has_rdoc:
data/spec/support/vcr.rb DELETED
@@ -1,14 +0,0 @@
1
- require 'vcr'
2
- require 'webmock'
3
- require 'docker'
4
-
5
- VCR.configure do |c|
6
- c.allow_http_connections_when_no_cassette = false
7
- c.filter_sensitive_data('<DOCKER_HOST>') { Docker.url }
8
- c.filter_sensitive_data('<USERNAME>') { ENV['DOCKER_API_USER'] }
9
- c.filter_sensitive_data('<PASSWORD>') { ENV['DOCKER_API_PASS'] }
10
- c.filter_sensitive_data('<EMAIL>') { ENV['DOCKER_API_EMAIL'] }
11
- c.hook_into :excon, :webmock
12
- c.cassette_library_dir = File.join(File.dirname(__FILE__), '..', 'vcr')
13
- c.configure_rspec_metadata!
14
- end
@@ -1,32 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: <DOCKER_HOST>/v1.16/auth
6
- body:
7
- encoding: UTF-8
8
- string: ! '{"username":"<USERNAME>","password":"<PASSWORD>","email":"<USERNAME>@gmail.com","serveraddress":"https://index.docker.io/v1/"}'
9
- headers:
10
- User-Agent:
11
- - Swipely/Docker-API 1.18.0
12
- Content-Type:
13
- - application/json
14
- response:
15
- status:
16
- code: 200
17
- message:
18
- headers:
19
- Content-Type:
20
- - application/json
21
- Date:
22
- - Thu, 12 Feb 2015 00:56:24 GMT
23
- Content-Length:
24
- - '29'
25
- body:
26
- encoding: US-ASCII
27
- string: ! '{"Status":"Login Succeeded"}
28
-
29
- '
30
- http_version:
31
- recorded_at: Thu, 12 Feb 2015 00:56:24 GMT
32
- recorded_with: VCR 2.9.2