magellan-cli 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/magellan/cli/http.rb +10 -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: 75c33ee36cf2a036e44f83936430b41069da6652
|
4
|
+
data.tar.gz: fff038dcf11eaf7803f3907337830193904d57e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f842ef103745ff900ffb4c6c814192bd33b6d30f65de08a62224e2039f901369da12b36c4e1589b90b4a4209bcc2034e2bd356238398a37fc04fa72242d8c0ab
|
7
|
+
data.tar.gz: 9766570f91bca86217cdff7a33a89b948ab24a0351f439f6d29e21d5523293b260cf71a9760bc90228ba6b5eafaee3fe728158b7a6c7c85efd0103482fff7ac1
|
data/Gemfile.lock
CHANGED
data/lib/magellan/cli/http.rb
CHANGED
@@ -32,7 +32,16 @@ module Magellan
|
|
32
32
|
def check_response(res)
|
33
33
|
case res.status
|
34
34
|
when 200...400 then
|
35
|
-
|
35
|
+
begin
|
36
|
+
r = JSON.parse(res.body)
|
37
|
+
rescue
|
38
|
+
# DELETE で 302 Found を返す時に HTML がレンダリングされることがあるので
|
39
|
+
# status code 300 台では JSON パースエラーを無視する
|
40
|
+
if res.status >= 300
|
41
|
+
return nil
|
42
|
+
end
|
43
|
+
raise
|
44
|
+
end
|
36
45
|
log_verbose(JSON.pretty_generate(r))
|
37
46
|
r
|
38
47
|
else
|
data/lib/magellan/cli/version.rb
CHANGED