cb-api 18.2.0 → 18.2.1

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: 4422245ed4eaaac2561e4f9ec9c18078f992bd34
4
- data.tar.gz: d14f587db18a9feeaaed78f1b8b9c4add9caaa49
3
+ metadata.gz: 279f56a5617e6962823d462d65ac3e7fc3d75543
4
+ data.tar.gz: 7a3f895ec2d734ed5fd8c7994550c3a007be6bc8
5
5
  SHA512:
6
- metadata.gz: d065b64369a899f2212bbd8844e18765dd8a89a82e8e3adb908909a97a733be65ced6310ef3ecb7fd72bf646b58e3b8002ab83a2f4988db354ff7776da1e76f9
7
- data.tar.gz: 46dcd4006752094bc49d8e520bdaf646f7e76b0e2b75353d6dfdb2fdeb5e39144340614ef3d2d2fdb6c98216dc601df20830a2910558824517b4c95e5432c8e9
6
+ metadata.gz: 890287318dbf8a5a0d726e21b8b73fae56bf669f8b039df202760d8079224344c6df0ca4b19a7be5d450e3fefb6f8f5692c3b57bcceed981767064d6b3bc3bf3
7
+ data.tar.gz: 221143b862d0e9b4fb76392bbed0491f940420b2546d3acba9cb41977e813f907f24bb404758445847e2daa244e2ea36f6d23e2ca5e5923ef610e12ae93d9079
data/CHANGELOG.md CHANGED
@@ -3,6 +3,7 @@ Version History
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
5
 
6
+ * 18.2.1 No functional changes, just renamed `execute_http_request` to `timed_http_request`.
6
7
  * 18.2.0 Collect API caller info a level above lib/cb/client.rb and get timings on errors as well.
7
8
  * 18.1.0 Adding report a job endpoint
8
9
  * 18.0.2 Updating contact info in the gemspec
data/lib/cb/client.rb CHANGED
@@ -25,7 +25,7 @@ module Cb
25
25
  private
26
26
 
27
27
  def call_api(request)
28
- http_wrapper.execute_http_request(
28
+ http_wrapper.timed_http_request(
29
29
  request.http_method,
30
30
  request.base_uri,
31
31
  request.endpoint_uri,
data/lib/cb/utils/api.rb CHANGED
@@ -39,35 +39,39 @@ module Cb
39
39
  end
40
40
 
41
41
  def cb_get(path, options = {}, &block)
42
- execute_http_request(:get, nil, path, options, &block)
42
+ timed_http_request(:get, nil, path, options, &block)
43
43
  end
44
44
 
45
45
  def cb_post(path, options = {}, &block)
46
- execute_http_request(:post, nil, path, options, &block)
46
+ timed_http_request(:post, nil, path, options, &block)
47
47
  end
48
48
 
49
49
  def cb_put(path, options = {}, &block)
50
- execute_http_request(:put, nil, path, options, &block)
50
+ timed_http_request(:put, nil, path, options, &block)
51
51
  end
52
52
 
53
53
  def cb_delete(path, options = {}, &block)
54
- execute_http_request(:delete, nil, path, options, &block)
54
+ timed_http_request(:delete, nil, path, options, &block)
55
55
  end
56
56
 
57
- def execute_http_request(http_method, uri, path, options = {}, &block)
58
- self.class.base_uri(uri || Cb.configuration.base_uri)
57
+ def timed_http_request(http_method, uri, path, options = {}, &block)
59
58
  api_caller = find_api_caller(caller)
60
59
  response = nil
61
60
  start_time = Time.now.to_f
62
61
  cb_event(:"cb_#{ http_method }_before", path, options, api_caller, response, 0.0, &block)
63
62
  begin
64
- response = self.class.method(http_method).call(path, options)
63
+ response = execute_http_request(http_method, uri, path, options)
65
64
  ensure
66
65
  cb_event(:"cb_#{ http_method }_after", path, options, api_caller, response, Time.now.to_f - start_time, &block)
67
66
  end
68
67
  validate_response(response)
69
68
  end
70
69
 
70
+ def execute_http_request(http_method, uri, path, options = {})
71
+ self.class.base_uri(uri || Cb.configuration.base_uri)
72
+ self.class.method(http_method).call(path, options)
73
+ end
74
+
71
75
  def append_api_responses(obj, resp)
72
76
  meta_class = ensure_non_nil_metavalues(obj)
73
77
 
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 = '18.2.0'
12
+ VERSION = '18.2.1'
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.2.0
4
+ version: 18.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The CareerBuilder.com Niche and Consumer Development teams