aws-xray 0.15.1 → 0.16.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: ab1ededbeaec72532b3fd8640450ed0c72ef255f
4
- data.tar.gz: 984d6f352917b1c3b279a2d859977e332aeac7fb
3
+ metadata.gz: cb65c48a877e87915776fa765ab77e7274287d1a
4
+ data.tar.gz: 5522ae2e4792cae8c313021d1705237d3734ad23
5
5
  SHA512:
6
- metadata.gz: f5d81c1b147dbffa156ec45eb8b459c54a4c3a849e1a6bdbc45295b5436674bac29782d81884b0b562fd497f1363f3bdae464a026b5272da38668f60c0471c73
7
- data.tar.gz: a27c730779d6fcda961858a7b97f95a9bea3380f93fe0aa29e74bb071aae1e6d5a0b7755e89297c5ba300de7255a66a04a6c35c4b230ee0877532fd33a9f4d6c
6
+ metadata.gz: a76f973fa970b3b29dd4d4755ac103fefe15905d235ee5cd231682d4bbc3d8dee3fef70e3a619a896daf45561f870f63805e1a50ca194c434e21415c74640f61
7
+ data.tar.gz: 8cd98e3d5d76249fd18aec23a6f883046cfd130813c68c35c09f2d3cc4b87b49285e5641746b04bd618c2aa20a49785cc5d027c154d21c40bbd9dd6b56dca681
@@ -27,8 +27,11 @@ module Aws
27
27
  end
28
28
 
29
29
  # @param [Aws::Xray::Context] context
30
- def set_current(context)
30
+ def with_given_context(context)
31
31
  Thread.current.thread_variable_set(VAR_NAME, context)
32
+ yield
33
+ ensure
34
+ remove_current
32
35
  end
33
36
 
34
37
  # @return [Boolean]
@@ -6,7 +6,7 @@ module Aws
6
6
  module NetHttp
7
7
  NAME_HEADER = 'X-Aws-Xray-Name'.freeze
8
8
 
9
- def request_with_aws_xray(req, *args)
9
+ def request_with_aws_xray(req, *args, &block)
10
10
  return request_without_aws_xray(req, *args) unless Context.started?
11
11
  return request_without_aws_xray(req, *args) if Context.current.disabled?(:net_http)
12
12
 
@@ -26,7 +26,7 @@ module Aws
26
26
  req[TRACE_HEADER] = propagate_trace.to_header_value
27
27
  sub.set_http_request(request_record)
28
28
 
29
- res = request_without_aws_xray(req, *args)
29
+ res = request_without_aws_xray(req, *args, &block)
30
30
 
31
31
  sub.set_http_response(res.code.to_i, res['Content-Length'])
32
32
  case res.code.to_i
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.15.1'
3
+ VERSION = '0.16.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-xray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taiki Ono
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-09 00:00:00.000000000 Z
11
+ date: 2017-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday