trailer_vote-api 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trailer_vote/api.rb +6 -2
- data/lib/trailer_vote/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88bf522500fdcf664db57980407879f64e03b68ad9783a572a5e0befef1fc33f
|
4
|
+
data.tar.gz: f6a78aa9dd29a8dcda39d0bbcdfb7d85dd16adf9f316d4748d4f8f8a7d3c931d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa884fe58e313193bba8a01a2481451ce41f44035fee37728369c8d06538d233e6abdeb24ca1363d17425f89ecb21c463ae79e56be47fe0eea86ad6d159c7947
|
7
|
+
data.tar.gz: '0695e1768905a76d37468847057edcd2682021254feca757f7e836cddf6119e945e3c1db6def62283f21ee432c480b2f12db816e820e8bbfb1acfb74e20cfc56'
|
data/lib/trailer_vote/api.rb
CHANGED
@@ -16,11 +16,15 @@ module TrailerVote
|
|
16
16
|
module_function
|
17
17
|
|
18
18
|
def decode(result)
|
19
|
-
|
19
|
+
begin
|
20
|
+
Oj.load(result, mode: :strict, symbol_keys: true)
|
21
|
+
rescue Oj::Error => err
|
22
|
+
raise DecodeError.new(media_type: media_type, source: err)
|
23
|
+
end
|
20
24
|
end
|
21
25
|
|
22
26
|
def encode(media_type, data)
|
23
|
-
|
27
|
+
Oj.dump(data, mode: :compat)
|
24
28
|
end
|
25
29
|
|
26
30
|
def default_unauthenticated_client
|