cb-api 17.0.2 → 17.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: a817bf2c012a74abcc9113695b8a4d5d380bc744
4
- data.tar.gz: 3872158d2df4f16e22641bb5f3977b1174682a5c
3
+ metadata.gz: 8c80664abd59b880495e3a2458b5af977655840f
4
+ data.tar.gz: 69ea0a53a191e570883c184c26a0a8aa35d15e64
5
5
  SHA512:
6
- metadata.gz: 0287f97514936d2148de4a551d7e71dd63ce40629734c57075a4c3aca15a8491d4852c342f4b85f54ea3e8432ffa0bea5958ed25d4b2ad13ffe13de30306542f
7
- data.tar.gz: ed3649b58b9e98b2ef786e8c02eca35177f9dfc0a0d78c581b981029ba24b5ab23b5733765e54cd4d8767d982524b4b80e570feba2365248124a557a9b4b9fda
6
+ metadata.gz: 3e7ba492dfb8e688dd7d5a58e719ef829848a0ced9f73ce29883163f7c654dbfee574c19b30623d10204242f938eed27e197571697c3919fb831f09b978e69d2
7
+ data.tar.gz: afafa2a22e3a20e363dca177296c2f4e8178d88c27681daa544d4af68aa14c438e87e885e3b9b335f167e085d9eee7883aed01d5a9c747bf773edf46617aa9c4
@@ -3,6 +3,7 @@ Version History
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
5
 
6
+ * 17.1.0 Start sending timings to all observers for API calls
6
7
  * 17.0.2 making sure we explicitly ask for version 1 of the consumer APIs
7
8
  * 17.0.1 adding posted_time and company_did to job results
8
9
  * 17.0.0 removed spot cms dependency
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- First things first. You're going to need to get a developer key from Careerbuilder. You can obtain a key at http://api.careerbuilder.com/RequestDevKey.aspx.
1
+ First things first. You're going to need to get a developer key from Careerbuilder. Developer keys are available to Partners. You can fill out the form at http://developer.careerbuilder.com/partner_messages/new to become a Partner.
2
2
 
3
3
  Now that you have a key, lets get to the good stuff.
4
4
 
@@ -25,7 +25,7 @@ Set your dev key, and any other configuration settings in a place that will run
25
25
  config.dev_key = 'your-dev-key-goes-here'
26
26
  config.time_out = 5
27
27
  end
28
-
28
+
29
29
  Available Endpoints
30
30
  ================
31
31
  https://github.com/cbdr/ruby-cb-api/blob/master/lib/cb/config.rb
@@ -64,7 +64,7 @@ Which encapsulates details of the search result
64
64
  search_result.city
65
65
  search_result.state
66
66
  search_result.postal_code
67
- search_result.search_location
67
+ search_result.search_location
68
68
 
69
69
  As well as returning back the jobs from the search result (`Cb::Models::Job` instances)
70
70
 
@@ -182,4 +182,4 @@ The following data is available from a job
182
182
  * `shared_job?`
183
183
  * `can_be_quick_applied?`
184
184
  * `has_questionnaire?`
185
- * `find_company`
185
+ * `find_company`
@@ -1,6 +1,6 @@
1
1
  module Cb
2
2
  module Models
3
- class ApiCall < Struct.new(:api_call_type, :path, :options, :response)
3
+ class ApiCall < Struct.new(:api_call_type, :path, :options, :response, :elapsed_time)
4
4
  end
5
5
  end
6
6
  end
@@ -46,9 +46,10 @@ module Cb
46
46
 
47
47
  def execute_http_request(http_method, uri, path, options={}, &block)
48
48
  self.class.base_uri(uri || Cb.configuration.base_uri)
49
- cb_event(:"cb_#{http_method.to_s}_before", path, options, nil, &block)
49
+ start_time = Time.now.to_f
50
+ cb_event(:"cb_#{ http_method }_before", path, options, nil, 0.0, &block)
50
51
  response = self.class.method(http_method).call(path, options)
51
- cb_event(:"cb_#{http_method.to_s}_after", path, options, response, &block)
52
+ cb_event(:"cb_#{ http_method }_after", path, options, response, Time.now.to_f - start_time, &block)
52
53
  validate_response(response)
53
54
  end
54
55
 
@@ -106,12 +107,12 @@ module Cb
106
107
  validated_response
107
108
  end
108
109
 
109
- def api_call_model(api_call_type, path, options, response)
110
- Cb::Models::ApiCall.new(api_call_type, path, options, response)
110
+ def api_call_model(api_call_type, path, options, response, time_elapsed)
111
+ Cb::Models::ApiCall.new(api_call_type, path, options, response, time_elapsed)
111
112
  end
112
113
 
113
- def cb_event(api_call_type, path, options, response, &block)
114
- call_model = api_call_model(api_call_type, path, options, response)
114
+ def cb_event(api_call_type, path, options, response, time_elapsed, &block)
115
+ call_model = api_call_model(api_call_type, path, options, response, time_elapsed)
115
116
  block.call(call_model) if block_given?
116
117
  changed(true)
117
118
  notify_observers(call_model)
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '17.0.2'
2
+ VERSION = '17.1.0'
3
3
  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: 17.0.2
4
+ version: 17.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: 2015-08-06 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
370
370
  version: '0'
371
371
  requirements: []
372
372
  rubyforge_project:
373
- rubygems_version: 2.2.2
373
+ rubygems_version: 2.4.8
374
374
  signing_key:
375
375
  specification_version: 4
376
376
  summary: Ruby wrapper around Careerbuilder Public API.