trailer_vote-api 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/lib/trailer_vote/api/errors.rb +8 -1
- data/lib/trailer_vote/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c36cbd2a3291e9d71f60f52856c3b2ccfbd39953
|
4
|
+
data.tar.gz: 454952b01ccb6acc926b4955da0069190462e836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 317ba976bffc5a1ff85254ea1babf3ec72517f83893ad76b23d32dc452bbb07cd373a40ae54937f41807113339fef487fb9cae9314f695649c662a8845924a19
|
7
|
+
data.tar.gz: a44bce3cf05ecf0492c547503b0ad732559940040efc35ff783fc27da31ebccf7379810b1b2a6a270f395c7d56e2f0eb59a6f9fc651acb5682e0c8643dba8a6f
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trailer_vote-api (0.8.
|
4
|
+
trailer_vote-api (0.8.2)
|
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)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
json (>= 1.8, < 3)
|
50
50
|
simplecov-html (~> 0.10.0)
|
51
51
|
simplecov-html (0.10.2)
|
52
|
-
trailer_vote-media_types (0.6.
|
52
|
+
trailer_vote-media_types (0.6.3)
|
53
53
|
media_types (>= 0.6.0, < 1)
|
54
54
|
unf (0.1.4)
|
55
55
|
unf_ext
|
@@ -48,7 +48,7 @@ module TrailerVote
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def messages
|
51
|
-
Array(
|
51
|
+
Array(formatted_data[:errors]).map { |error| error[:message] }.join(', ')
|
52
52
|
end
|
53
53
|
|
54
54
|
def data
|
@@ -57,6 +57,13 @@ module TrailerVote
|
|
57
57
|
# noinspection RubyStringKeysInHashInspection
|
58
58
|
@data = { errors: [{ message: result.status.reason }] }
|
59
59
|
end
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
def formatted_data
|
64
|
+
return data if data.is_a?(::Hash)
|
65
|
+
{ errors: [{ message: String(data) }] }
|
66
|
+
end
|
60
67
|
end
|
61
68
|
|
62
69
|
class ClientError < ErrorsResponse; end
|