magellan-cli 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/magellan/cli/resources/stage.rb +22 -1
- data/lib/magellan/cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fafd6ef1e9963ac45677c464b52c52db37f45f74
|
4
|
+
data.tar.gz: bf28cf93a13e0077a55e14949f154abd6b4b6f34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0636c2e41de3c268954c1cd4d9bb12bc6977f413e0f745fbb2027f067fa0112a92960ce4e221a59d31513d7843f279f301317463a2e4365930c7327d47cb310
|
7
|
+
data.tar.gz: b6ac92ce372882609961a234ab99d0c548bb41aa01cdc4693695395d1db51b77a9f9dd85bfb423206755e18d4afff3eec19aa5c3b8f199db3153637eb6bf467c
|
data/Gemfile.lock
CHANGED
@@ -78,6 +78,20 @@ module Magellan
|
|
78
78
|
Container.new.show_list(r["result"])
|
79
79
|
end
|
80
80
|
|
81
|
+
desc "repair", "repair stage status"
|
82
|
+
def repair
|
83
|
+
r = call_repair
|
84
|
+
puts r["success"] ? "\e[32msucceeded to repair stage\e[0m" : "\e[31mfailed to repair stage\e[0m"
|
85
|
+
end
|
86
|
+
|
87
|
+
no_commands do
|
88
|
+
def call_repair
|
89
|
+
s = load_selection("stage")
|
90
|
+
id = s["id"]
|
91
|
+
post_json("/admin/stage~title/#{id}/simple_method_call.json", {method_name: "repair"})
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
81
95
|
desc "update ATTRIBUTES", "update stage with ATTRIBUTES"
|
82
96
|
def update(attrs)
|
83
97
|
s = load_selection("stage")
|
@@ -123,10 +137,17 @@ module Magellan
|
|
123
137
|
complete = res4.select{ |r| r["status"] == "completed" }.length
|
124
138
|
print spacer
|
125
139
|
print "\rProgress: %2d /%2d" % [complete, total]
|
126
|
-
when "completed"
|
140
|
+
when "completed"
|
127
141
|
print spacer
|
128
142
|
puts "\r#{st}"
|
129
143
|
return
|
144
|
+
when "aborted" then
|
145
|
+
print spacer
|
146
|
+
puts "\rrelease #{st}"
|
147
|
+
puts "now repairing stage automatically..."
|
148
|
+
r = call_repair
|
149
|
+
puts r["success"] ? "succeeded to repair stage. try `stage release_now` again after fix" : "\e[31mfailed to repair stage\e[0m"
|
150
|
+
raise Magellan::Cli::Error, "release #{st}"
|
130
151
|
end
|
131
152
|
end
|
132
153
|
end
|
data/lib/magellan/cli/version.rb
CHANGED