kounta_rest 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kounta/customer.rb +1 -0
- data/lib/kounta/errors.rb +1 -0
- data/lib/kounta/rest/client.rb +3 -7
- data/lib/kounta/version.rb +1 -1
- metadata +2 -2
data/lib/kounta/customer.rb
CHANGED
data/lib/kounta/errors.rb
CHANGED
data/lib/kounta/rest/client.rb
CHANGED
@@ -30,20 +30,16 @@ module Kounta
|
|
30
30
|
response = @conn.request(request_method, "#{path_from_hash(url_hash)}.#{FORMAT.to_s}", options)
|
31
31
|
rescue OAuth2::Error => ex
|
32
32
|
if ex.message.include? 'The access token provided has expired'
|
33
|
-
log(
|
33
|
+
log(ex.message)
|
34
34
|
@conn = refreshed_token
|
35
35
|
retry
|
36
36
|
end
|
37
|
+
raise Kounta::Errors::APIError.new(ex.message)
|
37
38
|
end
|
38
|
-
|
39
|
-
log("response:")
|
40
39
|
|
41
40
|
if response
|
42
|
-
log("#{response.parsed}")
|
41
|
+
log("Response: #{response.parsed}")
|
43
42
|
response.parsed
|
44
|
-
else
|
45
|
-
log('No response recieved')
|
46
|
-
nil
|
47
43
|
end
|
48
44
|
end
|
49
45
|
|
data/lib/kounta/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kounta_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|