7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/dc.rb', line 7
def self.run
project = Project.new
if ARGV.empty?
project.run
else
case ARGV.size
when 1
case ARGV.first
when 'stop'
project.group.stop
when 'restart'
project.group.stop
project.group.start
when 'rs'
project.group.stop
project.group.rebuild_images
project.group.start
when 'ri'
project.rebuild_images
end
when 2
case ARGV
when ['rebuild', 'services']
project.group.stop
project.group.rebuild_images
project.group.start
when ['rebuild', 'images']
project.rebuild_images
end
end
end
end
|