kura 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +6 -0
- data/lib/kura/client.rb +9 -4
- data/lib/kura/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b88dd23727be1e2392bcd74b99be5d88d1ccbee
|
4
|
+
data.tar.gz: ec936aaef68ac2dafc299555139132b108367d91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fff8a43f1ca5095c46c2216e344b040837372cc41a4be90544b5771128deee26ae19a0bf20d69b0dd739f494f9e5e3ec0df1c7de611999e134a2f1219e4aecd1
|
7
|
+
data.tar.gz: cd52564a9ab33cf1a2f7bd72113ce4ae929a694425f8a527fb53913b4281b03575cb6c42705bb761200d4e2c38671cd668e2c96165d1469eb34f8f4183b99342
|
data/ChangeLog.md
CHANGED
data/lib/kura/client.rb
CHANGED
@@ -38,10 +38,15 @@ module Kura
|
|
38
38
|
|
39
39
|
def process_error(err)
|
40
40
|
if err.respond_to?(:body)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
begin
|
42
|
+
jobj = JSON.parse(err.body)
|
43
|
+
error = jobj["error"]
|
44
|
+
reason = error["errors"].map{|e| e["reason"]}.join(",")
|
45
|
+
errors = error["errors"].map{|e| e["message"] }.join("\n")
|
46
|
+
rescue JSON::ParserError
|
47
|
+
reason = err.status_code.to_s
|
48
|
+
errors = "HTTP Status: #{err.status_code}\nHeaders: #{err.header.inspect}\nBody:\n#{err.body}"
|
49
|
+
end
|
45
50
|
raise Kura::ApiError.new(reason, errors)
|
46
51
|
else
|
47
52
|
raise err
|
data/lib/kura/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chikanaga Tomoyuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|