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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef77a259dbf34528205757f5502a5dce262fb729
4
- data.tar.gz: 0b15d066a9bf928f210a7cc16e9ef95b8f498277
3
+ metadata.gz: bb40f7282560d60927512dbc3d1177955ac04acf
4
+ data.tar.gz: a2773ecf3722d44459098f96243a3cac056f2e7e
5
5
  SHA512:
6
- metadata.gz: ce9abb8c8eaaa1899ac1e9a9c5c139fd8419381d0eac9f14299d12291290af988a952672c8285f9f0968bb361c6d5654d98b6242a69f98146430769abc256b10
7
- data.tar.gz: 9790583d4c20f1539dd82019fa87db583112df0c682ec944b7d3d880dfd6d05de78ef8d741663a1166bbd0d81e68f13ab83b81b9e3d668e2533efe7f727ba94e
6
+ metadata.gz: 954cfb7ee3d6c86e8cd4edaf94997093d352fcdde3504c33b36dcab32afed5479382b6589a54c71ea9eb055b3828609b5372c4d067f7b2ea938dece1aa488294
7
+ data.tar.gz: 6a8afcf4bb086d8ade277a89b5614cb29d030ef931fa660f4a286e09ce9fc061ab112b6a4d53c10fc8e7f364cd3ff2af141f5ad4434da20b65c9adbaee357738
@@ -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
@@ -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)
@@ -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 developerkey: Cb.configuration.dev_key,
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
@@ -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.6.4'
12
+ VERSION = '22.7.0'
13
13
  end
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.6.4
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-07-12 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty