cb-api 22.2.0 → 22.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/cb/clients/job.rb +11 -1
- data/lib/cb/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: b91339a4af9df1083dbe017da2e095b87134f072
|
4
|
+
data.tar.gz: 181fc3960de540685d452e67a723f7dce32dcc9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 152d817c7fe7007b2fdaa37f101c0fd9a0aee2f15168a9996a021d4db139d0d57aec49ae328409557a91b488b40b1ee184f9a92f40276a140a11d6a162172c69
|
7
|
+
data.tar.gz: c66d64889a844a4a69b012c0962b4f51b759368c631209a01d5a82c895684e6e7aaaeb54c489643164155ba7f6c44991d9526738318c27c6712e0b2f8e014766
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,7 @@ Version History
|
|
2
2
|
====
|
3
3
|
* All Version bumps are required to update this file as well!!
|
4
4
|
----
|
5
|
+
* 22.2.1 Add error checking and raising back on Job call
|
5
6
|
* 22.2.0 Add new Recommendations client (alongside existing Recommendation client) that returns a hash
|
6
7
|
* 22.1.0 Headers can be set on api instantiation.
|
7
8
|
* 22.0.0 Return a hash from Job rather than a model
|
data/lib/cb/clients/job.rb
CHANGED
@@ -14,7 +14,17 @@ module Cb
|
|
14
14
|
class Job < Base
|
15
15
|
class << self
|
16
16
|
def get(args={})
|
17
|
-
cb_client.cb_get(Cb.configuration.uri_job_find, query: args)
|
17
|
+
response = cb_client.cb_get(Cb.configuration.uri_job_find, query: args)
|
18
|
+
not_found_check(response)
|
19
|
+
response
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def not_found_check(response)
|
25
|
+
return if response.nil?
|
26
|
+
errors = Cb::Responses::Errors.new(response['ResponseJob'], false).parsed.join
|
27
|
+
raise Cb::DocumentNotFoundError, errors if errors.downcase.include? 'job was not found'
|
18
28
|
end
|
19
29
|
end
|
20
30
|
end
|
data/lib/cb/version.rb
CHANGED