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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7211a1acb643357ca3b627c577a068fb1f8bc36
4
- data.tar.gz: 502d48c44c2fe0c17fac18e06b3f02599f6b9132
3
+ metadata.gz: b91339a4af9df1083dbe017da2e095b87134f072
4
+ data.tar.gz: 181fc3960de540685d452e67a723f7dce32dcc9a
5
5
  SHA512:
6
- metadata.gz: 9fea5ca598d6bd559038830e50bb2d5c8620e1c6089a793a0ab5ba634a381513d1207f8f8ff49466125900abeb4a62214e0691cef91977d7d0fc3c1d9ec7ab3b
7
- data.tar.gz: f71b0af9bd5831c4afd13de7a006cda9877e8bedb9d5977e717c9b18c127eb2c73c8a229af543e61ab813d133cafc0b812c6317c5b0de6055c6e37ffcc8491a2
6
+ metadata.gz: 152d817c7fe7007b2fdaa37f101c0fd9a0aee2f15168a9996a021d4db139d0d57aec49ae328409557a91b488b40b1ee184f9a92f40276a140a11d6a162172c69
7
+ data.tar.gz: c66d64889a844a4a69b012c0962b4f51b759368c631209a01d5a82c895684e6e7aaaeb54c489643164155ba7f6c44991d9526738318c27c6712e0b2f8e014766
@@ -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
@@ -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
@@ -9,5 +9,5 @@
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and limitations under the License.
11
11
  module Cb
12
- VERSION = '22.2.0'
12
+ VERSION = '22.2.1'
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.2.0
4
+ version: 22.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The CareerBuilder.com Niche and Consumer Development teams