aws-xray 0.6.0 → 0.6.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: ed0623dec8afd758f243655af0b3fe43b95224b2
4
- data.tar.gz: c3d3c662f3f7219cfef71feb92a4029fd02aa14b
3
+ metadata.gz: '0976ec151baafd973cfcb253bb8c72ceeceb1425'
4
+ data.tar.gz: b91bd7bf26e3fae566c962a4bd5f3a72d316ca1f
5
5
  SHA512:
6
- metadata.gz: 7e33e09714c5646804d0378d9f212960870662629f96aefa5386b970f7bd1ed229e9ae81e7f9a755e3a33d03996490f432dc0d941300a66064f28cdc5691f755
7
- data.tar.gz: a26253e13ef30f84be6c130cf50ef1e254d30fd4d5e962aafaa2101247bf9172a8a9ab5343808646a96d55b8f9777a1230282ff7fd359864a2287734c2f15184
6
+ metadata.gz: d2f85373ef66e1faa436030a78e58c3b88ef0b076d941b32c81f0d748b105a7a0a30c8b87241cc6dfafd5c4bbc96663c531282511ee4e53f32626aa0f54beb62
7
+ data.tar.gz: 00ad0675fca0043ea74a72579871253aa8780aa1e5dfe99d161466d3722d9f86ffe92c05b70d5caed9bf962d25520909119717c72c120ae22222cec56e9cdfc5
@@ -3,14 +3,10 @@ require 'socket'
3
3
  module Aws
4
4
  module Xray
5
5
  class Client
6
- option = ENV['AWS_XRAY_LOCATION']
7
- DEFAULT_HOST = option ? option.split(':').first : 'localhost'
8
- DEFAULT_PORT = option ? Integer(option.split(':').last) : 2000
9
-
10
6
  # sock is for test
11
7
  #
12
8
  # XXX: keep options for implmenting copying later.
13
- def initialize(host: DEFAULT_HOST, port: DEFAULT_PORT, sock: nil)
9
+ def initialize(host: nil, port: nil, sock: nil)
14
10
  @host, @port = host, port
15
11
  @sock = sock || UDPSocket.new
16
12
  end
@@ -5,6 +5,10 @@ module Aws
5
5
  module Xray
6
6
  # thread-unsafe, suppose to be used only in initialization phase.
7
7
  class Configuration
8
+ option = ENV['AWS_XRAY_LOCATION']
9
+ DEFAULT_HOST = option ? option.split(':').first : 'localhost'
10
+ DEFAULT_PORT = option ? Integer(option.split(':').last) : 2000
11
+
8
12
  # @return [String] name Logical service name for this application.
9
13
  attr_accessor :name
10
14
 
@@ -13,7 +17,7 @@ module Aws
13
17
  # - port: e.g. 2000
14
18
  # - sock: test purpose.
15
19
  def client_options
16
- @client_options ||= { host: '127.0.0.1', port: 2000 }
20
+ @client_options ||= { host: DEFAULT_HOST, port: DEFAULT_PORT }
17
21
  end
18
22
  attr_writer :client_options
19
23
 
@@ -1,5 +1,5 @@
1
1
  module Aws
2
2
  module Xray
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-xray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taiki Ono