stacco 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/stacco +12 -7
- data/lib/stacco.rb +4 -0
- data/stacco.gemspec +1 -1
- metadata +1 -1
data/bin/stacco
CHANGED
@@ -14,6 +14,8 @@ class String
|
|
14
14
|
return :cyan unless self.kind_of? String
|
15
15
|
|
16
16
|
case self
|
17
|
+
when /DOWN$/
|
18
|
+
:red
|
17
19
|
when /COMPLETE$/
|
18
20
|
:green
|
19
21
|
when /IN_PROGRESS$/
|
@@ -73,15 +75,22 @@ unless orch_config_path.file?
|
|
73
75
|
end
|
74
76
|
|
75
77
|
orch = Stacco::Orchestrator.from_config(orch_config_path)
|
78
|
+
stacks = orch.stacks
|
76
79
|
|
77
|
-
|
80
|
+
case subcommand
|
81
|
+
when :"stacks:list"
|
82
|
+
puts "known stacks:"
|
83
|
+
stacks.each do |st|
|
84
|
+
puts " #{st.name.colored(st.status.guess_color)}"
|
85
|
+
end
|
86
|
+
Kernel.exit 0
|
87
|
+
when :"stacks:import"
|
78
88
|
stack_defn = $stdin.read
|
79
89
|
stack = orch.define_stack stack_defn
|
80
|
-
puts "stack '#{stack.name}'
|
90
|
+
puts "stack '#{stack.name}' imported"
|
81
91
|
Kernel.exit 0
|
82
92
|
end
|
83
93
|
|
84
|
-
stacks = orch.stacks
|
85
94
|
case stacks.length
|
86
95
|
when 0
|
87
96
|
$stderr.puts "no stacks defined!"
|
@@ -101,10 +110,6 @@ else
|
|
101
110
|
|
102
111
|
unless stack
|
103
112
|
$stderr.puts "unknown stack '#{stack_name}'"
|
104
|
-
$stderr.puts "known stacks:"
|
105
|
-
stacks.each do |st|
|
106
|
-
$stderr.puts " #{st.name}"
|
107
|
-
end
|
108
113
|
Kernel.exit 1
|
109
114
|
end
|
110
115
|
end
|
data/lib/stacco.rb
CHANGED
data/stacco.gemspec
CHANGED