ecs-solo 0.1.1 → 0.1.2

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: db9c06812327daa8c7eb8200db78c4aef2bb15403f8abd3788f8ec4d2031e794
4
- data.tar.gz: 9968d668652d2f6cfcdb075990005bce4d638d40927366308bcae47a5496e2d2
3
+ metadata.gz: c3b2dda2ee0569cc01a40abce66be6444f14b848502d8b6fd0eedb36cd64c433
4
+ data.tar.gz: fd706a0394d043146ad2df06efdc2a56301462631b384eab551f23db33feeed6
5
5
  SHA512:
6
- metadata.gz: abbf8c3b65d09f4d5b0c5d869401a0869ef38430303ea788ba3b70842c84e4a2bab3e35230f9b7fcfb9adfd6df05b05232f8781c41cfea7ef9ed55ce783ece33
7
- data.tar.gz: a6d0215427d9c3288f7e9a7fded3192eb9d05377e3c2c75c6b1f6694467938834e86bc63689c65908132500cd8c206b00e129bd99d92dc11616b64f33362d1af
6
+ metadata.gz: 77690e63652d16c7224198aa0173eebf453ef0720899b39eb8a29320c6db4ce199bb6979e7886bc81550d88d7860985b7751081bb451d8e8f6fc05ba78179cb1
7
+ data.tar.gz: 92f141b9e4027d561302dbc534ffa5826ee844edd564e0457e99aca14719a05fa24d87209ca6e76cf61d9ffa10a580d10cb3bf1575cc90381e7f53daf6ecb7dd
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.1.2]
7
+ - clean up container if its not running and start it
8
+
6
9
  ## [0.1.1]
7
10
  - fix error message when ecs service not found and fix specs
8
11
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ecs-solo (0.1.0)
4
+ ecs-solo (0.1.1)
5
5
  activesupport
6
6
  aws-sdk-cloudformation
7
7
  aws-sdk-ecs
@@ -17,12 +17,20 @@ module EcsSolo
17
17
  stop
18
18
  rm
19
19
  run
20
+ elsif !running?
21
+ rm
22
+ run
20
23
  else
21
24
  puts "WARN: container name is already in use".color(:yellow)
22
25
  puts "If you want to force a new container, use the --force-new option."
23
26
  end
24
27
  end
25
28
 
29
+ def running?
30
+ out = sh "docker inspect -f '{{.State.Running}}' #{name}"
31
+ out.strip == "true"
32
+ end
33
+
26
34
  def run
27
35
  sh "docker run --name #{name} -d #{image} #{@command}"
28
36
  end
@@ -68,7 +76,9 @@ module EcsSolo
68
76
 
69
77
  def sh(command)
70
78
  puts "=> #{command}"
71
- system(command)
79
+ out = `#{command}`
80
+ puts out
81
+ out
72
82
  end
73
83
  end
74
84
  end
@@ -1,3 +1,3 @@
1
1
  module EcsSolo
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecs-solo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-28 00:00:00.000000000 Z
11
+ date: 2020-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -212,6 +212,7 @@ files:
212
212
  - lib/ecs_solo/help/deploy.md
213
213
  - lib/ecs_solo/version.rb
214
214
  - pkg/ecs-solo-0.1.0.gem
215
+ - pkg/ecs-solo-0.1.1.gem
215
216
  - pkg/solo-0.1.0.gem
216
217
  - spec/cli_spec.rb
217
218
  - spec/spec_helper.rb