kounta_rest 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kounta/resource.rb +1 -1
- data/lib/kounta/rest/client.rb +2 -1
- data/lib/kounta/version.rb +1 -1
- metadata +1 -1
data/lib/kounta/resource.rb
CHANGED
data/lib/kounta/rest/client.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'oauth2'
|
2
2
|
require 'yell'
|
3
|
+
require 'oj'
|
3
4
|
|
4
5
|
module Kounta
|
5
6
|
module REST
|
@@ -26,7 +27,7 @@ module Kounta
|
|
26
27
|
|
27
28
|
def perform(url_hash, request_method, options={})
|
28
29
|
begin
|
29
|
-
log("#{request_method}: #{Kounta::SITE_URI}#{path_from_hash(url_hash)}.#{FORMAT.to_s} (#{Oj.dump(options[:body])})")
|
30
|
+
log("#{request_method}: #{Kounta::SITE_URI}#{path_from_hash(url_hash)}.#{FORMAT.to_s} (#{Oj.dump(options[:body], mode: :compat)})")
|
30
31
|
response = @conn.request(request_method, "#{path_from_hash(url_hash)}.#{FORMAT.to_s}", options.merge(REQUEST_HEADERS))
|
31
32
|
rescue OAuth2::Error => ex
|
32
33
|
if ex.message.include? 'The access token provided has expired'
|
data/lib/kounta/version.rb
CHANGED