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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70601e8059a720059ee08060d751962a46a416e60f878fbe0ce522aeaa3a23f1
4
- data.tar.gz: 96c02556c4d6f00537a296c7cebb4ab1e01862811957422ed24d654b63eca252
3
+ metadata.gz: 8006ca1ad2809f443a29d127674c96af786af1aafcb786cb3fe75097ffe442c2
4
+ data.tar.gz: 7391633145c69d560b78d4ab5daa48f447cffd8db8aad9c29d181e3b3699565d
5
5
  SHA512:
6
- metadata.gz: 8d0ca9420a2259b412d6483f87534b6b000ede64faa72aae22be4d81f4a7c5af6ca55968a3d30d08544a9dcbf4f513c0ebe94f65febb61890194ec853d2929c2
7
- data.tar.gz: fde5a644ece1f3db35399ddc7e3d81c8d41ec2a7755abdc36aa46581ddc0fef04c67348e84ec6c2f90084c3f68b1288c2606cff726ab9d81db0b937af8c494c3
6
+ metadata.gz: fc358417deee8c632a2c56e16172984cd568c758249333fc7d65ef4f952c927dd23e548037322c854cd81df4347ba7285037a8426465e132b37b85ce5d386bc6
7
+ data.tar.gz: 33a89394edd0012af9ed7bb5f14e9fd09e38c2c706ed4421249da638a558a1e1c1d0e7a214003f0bce4a7842f0249f8caf8251de07b69701d30110fcc9ac1653
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_docker (2.4.0.pre.10)
4
+ rake_docker (2.4.0.pre.11)
5
5
  aws-sdk-ecr (~> 1.2)
6
6
  colored2 (~> 3.1)
7
7
  docker-api (~> 1.34)
@@ -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 /#{name} exists..."
36
+ puts "Checking to see if #{name} exists..."
37
37
  end
38
38
 
39
39
  def container_exists(container)
40
- print "#{container.json['Name']} exists. "
40
+ print "#{container.name} exists. "
41
41
  end
42
42
 
43
43
  def container_does_not_exist(name)
44
- puts "/#{name} does not exist. Continuing."
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.json['Name']} created with ID: #{container.id}. "
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.json['Name']} stopped. "
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.json['Name']} deleted."
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
- begin
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)
@@ -1,3 +1,3 @@
1
1
  module RakeDocker
2
- VERSION = '2.4.0.pre.10'
2
+ VERSION = '2.4.0.pre.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0.pre.10
4
+ version: 2.4.0.pre.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson