aws-xray 0.12.1 → 0.12.2

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: 69d1b32bc7350b4f66874b8c49c26f0f16520a05
4
- data.tar.gz: 97a965b69f6f172a0eaa6287722a2793a0612682
3
+ metadata.gz: 263047b7e176ea3323645433bb42f1a04d451d17
4
+ data.tar.gz: 2361cf717b1e846fb4fda1b68c1bbf1da3f60b6a
5
5
  SHA512:
6
- metadata.gz: 7b1091719bec448f73e5437d41cbcf6cbb46ad90a0eb01c0f98fb66d1866bfeea6f50197f96f3f71f056907612fe2212af0e49785c59c3b22d533e91a176f80b
7
- data.tar.gz: 7536dd2b2509ef9e31ff2f04732e35e52e7ff11173177acb68b6761df77a3fbd0146b04248550ce68ebe3a111fe788f0b79479d6e5c5085def26eb8ad28c3441
6
+ metadata.gz: 8a483a0f714c25c101227822512aecd2810f08f02676ed2883eb82b7044564aa9fb1e1a99394e9aaa02495e821f1173b7cd88a4f4eca332b5655a20762fab6d3
7
+ data.tar.gz: bc827a4ec3c100a2798655152886454e5b4dc9c350be088e51a96ec2f85a50da1f8fd7f3795c782f2a3430ae64baf6efad9ed1ced52fd2139ad196291109ee20
@@ -7,9 +7,12 @@ module Aws
7
7
  class Client
8
8
  # sock is for test.
9
9
  def initialize(host: nil, port: nil, sock: nil)
10
- @host, @port = host.freeze, port.freeze
10
+ @host, @port = host, port
11
11
  @sock = sock
12
- freeze
12
+ end
13
+
14
+ def copy
15
+ self.class.new(host: @host ? @host.dup : nil, port: @port, sock: @sock)
13
16
  end
14
17
 
15
18
  # When UDPSocket#send can not send all bytes, just give up it.
@@ -63,7 +63,8 @@ module Aws
63
63
 
64
64
  # client and trace are frozen by default.
65
65
  def initialize(name, client, trace, base_segment_id = nil)
66
- @name = name.freeze
66
+ raise 'name is required' unless name
67
+ @name = name
67
68
  @client = client
68
69
  @trace = trace
69
70
  @base_segment_id = base_segment_id
@@ -77,7 +78,7 @@ module Aws
77
78
  #
78
79
  # See README for example.
79
80
  def copy
80
- self.class.new(@name, @client, @trace, @base_segment_id)
81
+ self.class.new(@name.dup, @client.copy, @trace.copy, @base_segment_id ? @base_segment_id.dup : nil)
81
82
  end
82
83
 
83
84
  # Rescue standard errors and record the error to the segment.
@@ -87,7 +88,7 @@ module Aws
87
88
  # @return [Object] A value which given block returns.
88
89
  def base_trace
89
90
  base_segment = Segment.build(@name, @trace)
90
- @base_segment_id = base_segment.id.dup
91
+ @base_segment_id = base_segment.id
91
92
 
92
93
  begin
93
94
  yield base_segment
@@ -26,10 +26,9 @@ module Aws
26
26
  attr_reader :root, :parent
27
27
 
28
28
  def initialize(root:, sampled: true, parent: nil)
29
- @root = root.freeze
29
+ @root = root
30
30
  @sampled = sampled
31
- @parent = parent.freeze
32
- freeze
31
+ @parent = parent
33
32
  end
34
33
 
35
34
  def to_header_value
@@ -47,8 +46,8 @@ module Aws
47
46
  !!@parent
48
47
  end
49
48
 
50
- def copy(parent:)
51
- self.class.new(root: @root.dup, sampled: @sampled, parent: parent.freeze)
49
+ def copy(parent: @parent)
50
+ self.class.new(root: @root.dup, sampled: @sampled, parent: parent ? parent.dup : nil)
52
51
  end
53
52
  end
54
53
  end
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.12.1'
3
+ VERSION = '0.12.2'
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.12.1
4
+ version: 0.12.2
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-07 00:00:00.000000000 Z
11
+ date: 2017-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday