cb-api 14.0.1 → 14.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +11 -0
- data/lib/cb/exceptions.rb +1 -0
- data/lib/cb/utils/validator.rb +12 -2
- data/lib/cb/version.rb +1 -1
- metadata +3 -2
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Version History
|
2
|
+
====
|
3
|
+
* All Version bumps are required to update this file as well!!
|
4
|
+
----
|
5
|
+
* 14.1.0 Adding custom error for Authentication Outages
|
6
|
+
* 14.0.1 Introduced a changelog (finally)
|
7
|
+
* 14.0.0 Rename location_code / zip to postal_code on the Cb::Models::User model to be more i18n friendly
|
8
|
+
* 13.0.1 This change is to turn off metadata parsing and raise exception if the api response does not contain metadata.
|
9
|
+
* This means we can optionally control wether or not a specific API call expects metadata to come back
|
10
|
+
* 13.0.0 Adds a new resume recommendations call and removes the old one *(BREAKING)*
|
11
|
+
* https://github.com/cbdr/ruby-cb-api/pull/154/files
|
data/lib/cb/exceptions.rb
CHANGED
data/lib/cb/utils/validator.rb
CHANGED
@@ -6,6 +6,18 @@ module Cb
|
|
6
6
|
|
7
7
|
class << self
|
8
8
|
def validate(response)
|
9
|
+
raise_response_code_errors(response)
|
10
|
+
process_response_body(response)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def raise_response_code_errors(response)
|
16
|
+
code = response.code rescue nil
|
17
|
+
raise Cb::ServiceUnavailableError if code == 503
|
18
|
+
end
|
19
|
+
|
20
|
+
def process_response_body(response)
|
9
21
|
body = response.response.body rescue nil
|
10
22
|
return Hash.new if !body
|
11
23
|
|
@@ -16,8 +28,6 @@ module Cb
|
|
16
28
|
try_parse_json(body) || try_parse_xml(body) || {}
|
17
29
|
end
|
18
30
|
|
19
|
-
private
|
20
|
-
|
21
31
|
def try_parse_json(body)
|
22
32
|
begin
|
23
33
|
JSON.parse(body)
|
data/lib/cb/version.rb
CHANGED
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: 14.0
|
4
|
+
version: 14.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: 2014-10-
|
12
|
+
date: 2014-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -358,6 +358,7 @@ files:
|
|
358
358
|
- lib/cb/utils/api.rb
|
359
359
|
- lib/cb/utils/response_map.rb
|
360
360
|
- lib/cb/utils/fluid_attributes.rb
|
361
|
+
- CHANGELOG.md
|
361
362
|
- README.md
|
362
363
|
homepage: http://api.careerbuilder.com
|
363
364
|
licenses:
|