cb-api 16.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@ Version History
2
2
  ====
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
-
5
+ * 16.1.0 Added support for handling a 401 unauthorized response. We should now raise specific UnauthorizedErrors.
6
6
  * 16.0.0 Modifying the Resume model to reflect the changes made in the API (Removal of job title from salary and
7
7
  addition of id to work experience and work Experience Id to salary
8
8
  * 15.1.0 Added resume post
data/lib/cb/exceptions.rb CHANGED
@@ -3,4 +3,5 @@ module Cb
3
3
  class ExpectedResponseFieldMissing < StandardError; end
4
4
  class ApiResponseError < StandardError; end
5
5
  class ServiceUnavailableError < ApiResponseError; end
6
+ class UnauthorizedError < ApiResponseError; end
6
7
  end
@@ -15,6 +15,7 @@ module Cb
15
15
  def raise_response_code_errors(response)
16
16
  code = response.code rescue nil
17
17
  raise Cb::ServiceUnavailableError if code == 503
18
+ raise Cb::UnauthorizedError if code == 401
18
19
  end
19
20
 
20
21
  def process_response_body(response)
data/lib/cb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '16.0.0'
2
+ VERSION = '16.1.0'
3
3
  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: 16.0.0
4
+ version: 16.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-20 00:00:00.000000000 Z
12
+ date: 2015-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty