rake_docker 2.4.0.pre.10 → 2.4.0.pre.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rake_docker/container.rb +12 -17
- data/lib/rake_docker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8006ca1ad2809f443a29d127674c96af786af1aafcb786cb3fe75097ffe442c2
|
4
|
+
data.tar.gz: 7391633145c69d560b78d4ab5daa48f447cffd8db8aad9c29d181e3b3699565d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc358417deee8c632a2c56e16172984cd568c758249333fc7d65ef4f952c927dd23e548037322c854cd81df4347ba7285037a8426465e132b37b85ce5d386bc6
|
7
|
+
data.tar.gz: 33a89394edd0012af9ed7bb5f14e9fd09e38c2c706ed4421249da638a558a1e1c1d0e7a214003f0bce4a7842f0249f8caf8251de07b69701d30110fcc9ac1653
|
data/Gemfile.lock
CHANGED
@@ -33,15 +33,15 @@ module RakeDocker
|
|
33
33
|
|
34
34
|
class PrintingReporter
|
35
35
|
def checking_if_container_exists(name)
|
36
|
-
puts "Checking to see if
|
36
|
+
puts "Checking to see if #{name} exists..."
|
37
37
|
end
|
38
38
|
|
39
39
|
def container_exists(container)
|
40
|
-
print "#{container.
|
40
|
+
print "#{container.name} exists. "
|
41
41
|
end
|
42
42
|
|
43
43
|
def container_does_not_exist(name)
|
44
|
-
puts "
|
44
|
+
puts "#{name} does not exist. Continuing."
|
45
45
|
end
|
46
46
|
|
47
47
|
def checking_if_image_available(image)
|
@@ -69,7 +69,7 @@ module RakeDocker
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def container_created(container)
|
72
|
-
print "#{container.
|
72
|
+
print "#{container.name} created with ID: #{container.id}. "
|
73
73
|
end
|
74
74
|
|
75
75
|
def checking_if_container_running(_)
|
@@ -105,7 +105,7 @@ module RakeDocker
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def container_stopped(container)
|
108
|
-
print "#{container.
|
108
|
+
print "#{container.name} stopped. "
|
109
109
|
end
|
110
110
|
|
111
111
|
def deleting_container(_)
|
@@ -113,7 +113,7 @@ module RakeDocker
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def container_deleted(container)
|
116
|
-
puts "#{container.
|
116
|
+
puts "#{container.name} deleted."
|
117
117
|
end
|
118
118
|
|
119
119
|
def done
|
@@ -124,7 +124,11 @@ module RakeDocker
|
|
124
124
|
module Utilities
|
125
125
|
def find_container(name)
|
126
126
|
begin
|
127
|
-
Docker::Container.get(name)
|
127
|
+
container = Docker::Container.get(name)
|
128
|
+
container.instance_eval do
|
129
|
+
define_singleton_method(:name) { name }
|
130
|
+
end
|
131
|
+
container
|
128
132
|
rescue Docker::Error::NotFoundError
|
129
133
|
nil
|
130
134
|
end
|
@@ -263,16 +267,7 @@ module RakeDocker
|
|
263
267
|
container.wait
|
264
268
|
reporter.container_stopped(container)
|
265
269
|
reporter.deleting_container(container)
|
266
|
-
|
267
|
-
container.delete
|
268
|
-
rescue Docker::Error::NotFoundError
|
269
|
-
# ignored, not sure why this happens though...
|
270
|
-
puts "Got not found error..."
|
271
|
-
rescue StandardError => e
|
272
|
-
require 'pp'
|
273
|
-
pp e
|
274
|
-
puts "Got different error..."
|
275
|
-
end
|
270
|
+
container.delete
|
276
271
|
reporter.container_deleted(container)
|
277
272
|
else
|
278
273
|
reporter.container_does_not_exist(name)
|
data/lib/rake_docker/version.rb
CHANGED