trailer_vote-api 0.8.0 → 0.8.1

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
  SHA1:
3
- metadata.gz: 035d07df472d9ab44ddba2e14502be9afda848d7
4
- data.tar.gz: dc7b3e5583f5983bf5c91eed6ef50a85699c67ce
3
+ metadata.gz: 0dec7c6d2ed054f4a4de949d17ed409a853f5b13
4
+ data.tar.gz: c3ff5c5256e8864a2be2c1a2a117ad27bb932fde
5
5
  SHA512:
6
- metadata.gz: 483ea0ce019b10b29b9c8f598d3e5f2822dd0e38efca8e6e16428d4cd2a116442c0f948483c3fbf3ac2762f95715f27112eb5f8df63819b72d30b6dfd043d89d
7
- data.tar.gz: 97e6fba14eabe8c3ee27c65cc9bcdcfb6f89e42f97bfd476ecf1cd76461df64664b715cd8e3c5d39aca6610193343f6efc5076c120bc4b6f0748f029867d1b77
6
+ metadata.gz: 948362c2f320ad48c44624f28058c2dc3824fdf73812b0ec1c1cef6164b314edc9ef0ac4780c44615ef5a134362487e7e98cfbefc1c8a45a27bf888e4046c05e
7
+ data.tar.gz: 31d79b0516dc36264ca0f8ff595d81f32d2a654ee80a63a99aaab71c51cf427721a0cff665a3588eed04ba66f52d20e42e013ea8561fab42beacb23d55704c60
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.8.1
2
+
3
+ - Add a fallback if the `errors` key does not exist for error messages
4
+ - Fix decoding error messages (use symbol instead of string)
5
+
1
6
  # 0.8.0
2
7
 
3
8
  - Symbolize all keys to ensure interopt. with TrailerVote ingestion, and Ruby hash defaults
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trailer_vote-api (0.8.0)
4
+ trailer_vote-api (0.8.1)
5
5
  http (>= 3.3.0, < 4.x)
6
6
  oj (>= 3.6, < 4.x)
7
7
  trailer_vote-media_types (>= 0.6.1, < 1)
@@ -48,14 +48,14 @@ module TrailerVote
48
48
  end
49
49
 
50
50
  def messages
51
- data['errors'].map { |error| error['message'] }.join(', ')
51
+ Array(data[:errors]).map { |error| error[:message] }.join(', ')
52
52
  end
53
53
 
54
54
  def data
55
55
  @data ||= TrailerVote::Api.decode(result)
56
56
  rescue DecodeError, UnknownMediaType
57
57
  # noinspection RubyStringKeysInHashInspection
58
- @data = { 'errors' => [{ 'message': result.status.reason }] }
58
+ @data = { errors: [{ message: result.status.reason }] }
59
59
  end
60
60
  end
61
61
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module Api
5
- VERSION = '0.8.0'
5
+ VERSION = '0.8.1'
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: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld