dc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dc.rb +19 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5481799a068360610f3762f574898557affbcac0983d4038060cf708a1f1404
4
- data.tar.gz: 5397e30c5534fa6d867dd46f3809ecb1c8a3aa1b451831fd7393e99c2797207f
3
+ metadata.gz: a57e99828881fea49a8aec10222d56d37647f610606151039a5fb826369bad31
4
+ data.tar.gz: fc69e3fe7306b34fac1a7885123c02768e0b020ce32a238f727c0080e03b6015
5
5
  SHA512:
6
- metadata.gz: f5a5fdce3cc139c41ad85045f025cbc56303b9303634a95a559412b9c68bc146c67fef38dc5d0a135fe71fadcc2f46496b60da94416be0bb05f2f3e3fd566ed7
7
- data.tar.gz: 8797f8a5ffacc10cabae32f0fe2eeb79aa45beb74420443b95ca84f11c13151c8e183a015a407c39887d65aa108a83bb112bfe832480b02f8565b63c888b0295
6
+ metadata.gz: c1e1e96dd023af690a81ef4d25cc1069c66a12b0e6241f9c970912eddded612e8763fffa7caddc20d1c2be65e7712d87651187a771ff5b824826055e441e98df
7
+ data.tar.gz: ebd614d7c0a99ab98b33c57a587806c3a0bc222ea44d3781d66a12e3894c60ceb109da38244540019c0315ae3ee2cbb8e82db547609cc1589cef8fa5c63defd9
data/lib/dc.rb CHANGED
@@ -13,13 +13,24 @@ module DC
13
13
  case ARGV.size
14
14
  when 1
15
15
  case ARGV.first
16
+ when 'stop'
17
+ project.group.stop
18
+ when 'restart'
19
+ project.group.stop
20
+ project.group.start
16
21
  when 'rs'
22
+ project.group.stop
23
+ project.group.rebuild_images
24
+ project.group.start
17
25
  when 'ri'
18
26
  project.rebuild_images
19
27
  end
20
28
  when 2
21
29
  case ARGV
22
30
  when ['rebuild', 'services']
31
+ project.group.stop
32
+ project.group.rebuild_images
33
+ project.group.start
23
34
  when ['rebuild', 'images']
24
35
  project.rebuild_images
25
36
  end
@@ -108,10 +119,17 @@ module DC
108
119
  containers.each &:start
109
120
  end
110
121
 
111
- def destroy
122
+ def stop
112
123
  containers.each &:destroy
113
124
  end
114
125
 
126
+ def rebuild_images
127
+ images.each do |image|
128
+ image.tag "before_rebuild.#{Time.now.to_i}"
129
+ image.build
130
+ end
131
+ end
132
+
115
133
  private
116
134
  def create_containers
117
135
  @hash.map do |name, value|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoly Chernow