cb-api 22.0.0 → 22.1.0
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/base.rb +2 -2
- data/lib/cb/utils/api.rb +4 -3
- data/lib/cb/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: cbd8c8ab106112bbbf4d5349a170410bbae41932
|
4
|
+
data.tar.gz: 1fddff8fef35c621e351c915c5fc2578238bd877
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a53cc91af8890988ee6a13037c3dc5a081c7ea7d9664be08206b9af9fbe6e4104b3dcd00d6f4a68f939964a36c4e5d1116bad26dd6ed834fab99f99e26381d7
|
7
|
+
data.tar.gz: 5874fc62f570429bcea653132b851526e60124657005202aa56ce60d617aac00b5ab10b2a66370ed31e167b2e626370ed28f578a573ae167239fce270ed02cd3
|
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.1.0 Headers can be set on api instantiation.
|
5
6
|
* 22.0.0 Return a hash from Job rather than a model
|
6
7
|
* 21.4.2 Catch branding exceptions so that we don't blow up the job details call. The side effect of a second API call is silly anyway
|
7
8
|
* 21.4.1 Update test for Ruby 2.3.1. `ArgumentError`'s error message changed from "wrong number of arguments (0 for 1)" to "wrong number of arguments (given 0, expected 1)" in Ruby 2.3.0.
|
data/lib/cb/clients/base.rb
CHANGED
data/lib/cb/utils/api.rb
CHANGED
@@ -18,8 +18,8 @@ module Cb
|
|
18
18
|
|
19
19
|
base_uri 'https://api.careerbuilder.com'
|
20
20
|
|
21
|
-
def self.instance
|
22
|
-
api = Cb::Utils::Api.new
|
21
|
+
def self.instance(headers: {})
|
22
|
+
api = Cb::Utils::Api.new(headers: headers)
|
23
23
|
Cb.configuration.observers.each do |class_name|
|
24
24
|
api.add_observer(class_name.new)
|
25
25
|
end
|
@@ -29,13 +29,14 @@ module Cb
|
|
29
29
|
api
|
30
30
|
end
|
31
31
|
|
32
|
-
def initialize
|
32
|
+
def initialize(headers: {})
|
33
33
|
self.class.default_params developerkey: Cb.configuration.dev_key,
|
34
34
|
outputjson: Cb.configuration.use_json.to_s
|
35
35
|
|
36
36
|
self.class.default_timeout Cb.configuration.time_out
|
37
37
|
self.class.headers.merge! ({ 'developerkey' => Cb.configuration.dev_key })
|
38
38
|
self.class.headers.merge! ({ 'accept-encoding' => 'deflate, gzip' }) unless Cb.configuration.debug_api
|
39
|
+
self.class.headers.merge! headers
|
39
40
|
end
|
40
41
|
|
41
42
|
def cb_get(path, options = {}, &block)
|
data/lib/cb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cb-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 22.
|
4
|
+
version: 22.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The CareerBuilder.com Niche and Consumer Development teams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|