magellan-cli 0.2.8 → 0.2.9

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
  SHA1:
3
- metadata.gz: f84015af091e8e39e5a63466e4518e74ad3d9b65
4
- data.tar.gz: ceae355f009d372955e052d0035a6ebbccc90a6b
3
+ metadata.gz: fafd6ef1e9963ac45677c464b52c52db37f45f74
4
+ data.tar.gz: bf28cf93a13e0077a55e14949f154abd6b4b6f34
5
5
  SHA512:
6
- metadata.gz: 3fef2a90a5b822b287ef8a8341b27ccd833602ca15105a656e747e09eafa83b2a21dddb5f3f316488e164cf6e404bc6f8030aac26cf2ab29af28a0cf502813ea
7
- data.tar.gz: 094d538e70201384bd2af1c20c4f5895431631e001484c11d82de88936dc28c2380c9c6db9cbfd1e055db191042f579ef9c938a1ddcc4ef4b792925bd49cd650
6
+ metadata.gz: c0636c2e41de3c268954c1cd4d9bb12bc6977f413e0f745fbb2027f067fa0112a92960ce4e221a59d31513d7843f279f301317463a2e4365930c7327d47cb310
7
+ data.tar.gz: b6ac92ce372882609961a234ab99d0c548bb41aa01cdc4693695395d1db51b77a9f9dd85bfb423206755e18d4afff3eec19aa5c3b8f199db3153637eb6bf467c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- magellan-cli (0.2.8)
4
+ magellan-cli (0.2.9)
5
5
  activesupport (~> 4.1.4)
6
6
  httpclient
7
7
  nokogiri
@@ -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", "aborted" then
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
@@ -1,5 +1,5 @@
1
1
  module Magellan
2
2
  module Cli
3
- VERSION = "0.2.8"
3
+ VERSION = "0.2.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magellan-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm2000