cb-api 22.6.4 → 22.7.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 +11 -6
- 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: bb40f7282560d60927512dbc3d1177955ac04acf
|
4
|
+
data.tar.gz: a2773ecf3722d44459098f96243a3cac056f2e7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 954cfb7ee3d6c86e8cd4edaf94997093d352fcdde3504c33b36dcab32afed5479382b6589a54c71ea9eb055b3828609b5372c4d067f7b2ea938dece1aa488294
|
7
|
+
data.tar.gz: 6a8afcf4bb086d8ade277a89b5614cb29d030ef931fa660f4a286e09ce9fc061ab112b6a4d53c10fc8e7f364cd3ff2af141f5ad4434da20b65c9adbaee357738
|
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.7.0 Option to add default params to httparty calls
|
5
6
|
* 22.6.4 Added fields to the resume put object to allow replace resume
|
6
7
|
* 22.6.3 Added fields to update resume api call to allow replace resume
|
7
8
|
* 22.6.2 Updating just to test rubygems publishing from travis
|
data/lib/cb/clients/base.rb
CHANGED
@@ -12,8 +12,8 @@ module Cb
|
|
12
12
|
module Clients
|
13
13
|
class Base
|
14
14
|
class << self
|
15
|
-
def cb_client(headers: {})
|
16
|
-
@cb_client ||= Cb::Utils::Api.instance(headers: headers)
|
15
|
+
def cb_client(headers: {}, use_default_params: true)
|
16
|
+
@cb_client ||= Cb::Utils::Api.instance(headers: headers, use_default_params: use_default_params)
|
17
17
|
end
|
18
18
|
|
19
19
|
def headers(args)
|
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(headers: {})
|
22
|
-
api = Cb::Utils::Api.new(headers: headers)
|
21
|
+
def self.instance(headers: {}, use_default_params: true)
|
22
|
+
api = Cb::Utils::Api.new(headers: headers, use_default_params: use_default_params)
|
23
23
|
Cb.configuration.observers.each do |class_name|
|
24
24
|
api.add_observer(class_name.new)
|
25
25
|
end
|
@@ -29,10 +29,8 @@ module Cb
|
|
29
29
|
api
|
30
30
|
end
|
31
31
|
|
32
|
-
def initialize(headers: {})
|
33
|
-
self.class.default_params
|
34
|
-
outputjson: Cb.configuration.use_json.to_s
|
35
|
-
|
32
|
+
def initialize(headers: {}, use_default_params: true)
|
33
|
+
self.class.default_params add_default_params if use_default_params
|
36
34
|
self.class.default_timeout Cb.configuration.time_out
|
37
35
|
h = { 'developerkey' => Cb.configuration.dev_key }
|
38
36
|
h.merge! ({ 'accept-encoding' => 'deflate, gzip' }) unless Cb.configuration.debug_api
|
@@ -176,6 +174,13 @@ module Cb
|
|
176
174
|
return '' unless api_hash_key.respond_to?(:snakecase)
|
177
175
|
api_hash_key.snakecase
|
178
176
|
end
|
177
|
+
|
178
|
+
def add_default_params
|
179
|
+
{
|
180
|
+
developerkey: Cb.configuration.dev_key,
|
181
|
+
outputjson: Cb.configuration.use_json.to_s
|
182
|
+
}
|
183
|
+
end
|
179
184
|
end
|
180
185
|
end
|
181
186
|
end
|
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.7.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: 2017-
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|