cb-api 22.0.0 → 22.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c1c372fd5391bebc46037c63268e907c900b226
4
- data.tar.gz: ba5a92998b4e64f9e84268726714e7d741b241ea
3
+ metadata.gz: cbd8c8ab106112bbbf4d5349a170410bbae41932
4
+ data.tar.gz: 1fddff8fef35c621e351c915c5fc2578238bd877
5
5
  SHA512:
6
- metadata.gz: 00a1ab93fba95b42ca3b2e9ab1136d78f555fadb15d86a2fec467453c41d0641bb968881c454a74f19ccbe3e00b5b76aad9b5348a05f4a890739fb793d6a2351
7
- data.tar.gz: 76c4eba4721bbc2f2a0ed4aaf3ef4ec4fc85a06bbed7e7fb60af1cfde4ddad5ef8c927cb25b8d00115d951e723020cef09c0b01d58744fa083a9cc4ad87ced7a
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.
@@ -12,8 +12,8 @@ module Cb
12
12
  module Clients
13
13
  class Base
14
14
  class << self
15
- def cb_client
16
- @cb_client ||= Cb::Utils::Api.instance
15
+ def cb_client(headers: {})
16
+ @cb_client ||= Cb::Utils::Api.instance(headers: headers)
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
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
@@ -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.0.0'
12
+ VERSION = '22.1.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.0.0
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-07 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty