semaphore_client 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/semaphore_client/exceptions.rb +7 -1
- data/lib/semaphore_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6d4c0a4082eacb1e30c4c17c06d8b58b3addaf4
|
4
|
+
data.tar.gz: 1046b7f04b0edb7823b79ba55bd2d0bf195f7822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cef6ebcf123d8ab3fdb7494d0176ac9a76cc16bfe8d46acb9e14205cb00a58a35a63ef807c25479d6fe34fae97326cdb483657167f784a79ad377c5b4121b592
|
7
|
+
data.tar.gz: 008885de133cbfbf9640f5b45e4a4039bf0f0924bac45ab8242107902a3c20c70421a68cf278f81ff86517ac52a56785402e5a67c3f348c23de429bcddd42282
|
data/Gemfile.lock
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
class SemaphoreClient
|
2
2
|
class Exceptions
|
3
|
+
ApiError = Struct.new(:resource, :field, :code)
|
4
|
+
|
3
5
|
class Base < StandardError; end
|
4
6
|
|
5
7
|
class AttributeNotAvailable < Base; end
|
@@ -30,7 +32,11 @@ class SemaphoreClient
|
|
30
32
|
class Conflict < ResponseError; end
|
31
33
|
|
32
34
|
# 422
|
33
|
-
class UnprocessableEntity < ResponseError
|
35
|
+
class UnprocessableEntity < ResponseError
|
36
|
+
def errors
|
37
|
+
JSON.parse(@env[:body])["erorrs"].map { |error| ApiError.new(error) }
|
38
|
+
end
|
39
|
+
end
|
34
40
|
|
35
41
|
# 500+
|
36
42
|
class ServerError < ResponseError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semaphore_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jovan Ivanović
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|