smartcloud 0.0.64 → 0.0.65

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: f57d80ab93f419626510b2d56067a8c4173ce23adde538a10486763b7e6f8c93
4
- data.tar.gz: d1f022edbc76643df042308dc1ac38cdbed53a6fdc14e5af2dbb8c1a60e5ee67
3
+ metadata.gz: fd5c32045815ff6576bd192f7df5947c10b14fb707134c2d942e4ea0017ef684
4
+ data.tar.gz: 70b682cc6a8ffb885b8ed243dd992101905ab8185c55052fa6d07cf798676dbb
5
5
  SHA512:
6
- metadata.gz: 75bca97c9abc2b974e06c37eb817226f92ff699b50019f671f1495f53248ce15aedbf8ee11082ada423d6e30f55101b5bb1f2c7d165a7a5c99f3a8e4b17c1249
7
- data.tar.gz: 5e75c944d1761c25ab2a1429bb656e109d1feaf653da885ff878c5ef1152581d078c77e961f3cdedc7c6c7e6da85f22a79b5a7f48ca09a220e48f3f5e22af80a
6
+ metadata.gz: d83b11611099d06d112128fa74bc8ccaafb982a7ab3bc74673cf7f5edd63faa3cf2adb82cdd10787289fdebaeae170966edcfe45e895023d067db288be0f6dd8
7
+ data.tar.gz: 23dbf507e727f2e0599479be3699a961ad6dc909c1ab162e7f3bd5674ffe462a7a5a745ad9a92241ff1ca39ac2dca2c90974fd6c73b920499605327080c5615f
@@ -49,13 +49,15 @@ module Smartcloud
49
49
  def self.down
50
50
  if Smartcloud::Docker.running?
51
51
  # Stopping & Removing containers - in reverse order
52
- print "-----> Stopping container runner ... "
53
- if system("docker stop 'runner'", out: File::NULL)
54
- puts "done"
55
-
56
- print "-----> Removing container runner ... "
57
- if system("docker rm 'runner'", out: File::NULL)
52
+ if system("docker inspect -f '{{.State.Running}}' 'runner'", [:out, :err] => File::NULL)
53
+ print "-----> Stopping container runner ... "
54
+ if system("docker stop 'runner'", out: File::NULL)
58
55
  puts "done"
56
+
57
+ print "-----> Removing container runner ... "
58
+ if system("docker rm 'runner'", out: File::NULL)
59
+ puts "done"
60
+ end
59
61
  end
60
62
  end
61
63
 
@@ -347,10 +349,6 @@ module Smartcloud
347
349
  end
348
350
 
349
351
  # Creating & Starting container
350
- # IMPORTANT NOTE:
351
- # The below commands of docker are executed here. However, they run from the host.
352
- # Therefore, the ~ used in the commands below is used to denote the home directory of the host
353
- # and not the runner.
354
352
  print "-----> Creating container #{appname} ... "
355
353
  if system("docker create \
356
354
  --name='#{appname}' \
@@ -367,7 +365,7 @@ module Smartcloud
367
365
  system("docker network connect mysql-network #{appname}")
368
366
 
369
367
  print "-----> Starting container #{appname} ... "
370
- if system("docker start #{appname}", out: File::NULL)
368
+ if system("docker start #{appname}")
371
369
  puts "done"
372
370
  exit 0
373
371
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.64
4
+ version: 0.0.65
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timeboard