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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85c1b864ab21c5966aa20513bdbaa45fb419cf18e2957505c52dc660aff46211
4
- data.tar.gz: 821a9ff7476ba875e3aaa3bcded9905d39d19db9e0d00311e7d62c48de949505
3
+ metadata.gz: 88bf522500fdcf664db57980407879f64e03b68ad9783a572a5e0befef1fc33f
4
+ data.tar.gz: f6a78aa9dd29a8dcda39d0bbcdfb7d85dd16adf9f316d4748d4f8f8a7d3c931d
5
5
  SHA512:
6
- metadata.gz: 5b5923459febfdd02af85360e73f6e8563d36d398d43ec67d76cbc1489806929e9a9f32ad7d7238c3af6aee76ee247f155c93da56e0897701f9cbcb4a6930fd5
7
- data.tar.gz: 03f1d274a8106ce3e5a1760659ed2fdd2c1d36f66e9cb72ec8537f16e7042d72bbce997611fff7b1ae696b12b098eafc5d52090ce08bf5733ae6f78a00c3a73f
6
+ metadata.gz: aa884fe58e313193bba8a01a2481451ce41f44035fee37728369c8d06538d233e6abdeb24ca1363d17425f89ecb21c463ae79e56be47fe0eea86ad6d159c7947
7
+ data.tar.gz: '0695e1768905a76d37468847057edcd2682021254feca757f7e836cddf6119e945e3c1db6def62283f21ee432c480b2f12db816e820e8bbfb1acfb74e20cfc56'
@@ -16,11 +16,15 @@ module TrailerVote
16
16
  module_function
17
17
 
18
18
  def decode(result)
19
- TypeRegistry[result.content_type.mime_type].decode(result.body.to_s)
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
- TypeRegistry[media_type.to_s].encode(data)
27
+ Oj.dump(data, mode: :compat)
24
28
  end
25
29
 
26
30
  def default_unauthenticated_client
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module Api
5
- VERSION = '3.0.1'
5
+ VERSION = '3.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailer_vote-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld