tcp-client 0.9.2 → 0.9.3

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
  SHA256:
3
- metadata.gz: d29104bd490679a8fcb517f949e021cd1d2da263f3a60d622790bc2349faffab
4
- data.tar.gz: c7ebaf4f9f83eaf68b51bc47bb91fc5be5d446ef3e80b009bc93bca9d3508ef5
3
+ metadata.gz: 75811fed2b0735c2cac6a4e9671e138df88e6b8ada2be03a0d86b4b83b37b863
4
+ data.tar.gz: 9c715081912711178a0038d9af9832cf6c45e2620c2cff6dad899565de86be02
5
5
  SHA512:
6
- metadata.gz: 5e8c282afbefecb35973f7c563cb07782f8dd0e5df760c89d79aa42424784818c5c0e056c40139554642da8b24823aa9fbb7149e0ed7234f40cc51ea5a7a8165
7
- data.tar.gz: 2281b62117529f4bbeff55e297b67f8142235772b112d30f9530113e23ab4012242d5eb2fed4e8293a40836455259d37c91403f50714f292ee6e531250e4cc76
6
+ metadata.gz: d2842f5bd4fa2806c15bb94d6c1da9a897be40959a5db9033f404f1c980648a997daee0d49ad1fb75e4cf680644f72dfb04e880eb0c9e9ba9207d6ee3dd75240
7
+ data.tar.gz: 174878bab1414b1ef49bd67a1f296d21e463bd7d817442340192aace8af88e56d941b647ad43ff0ed5126e2c2ab16e0159c0467dd7a08289d93c423ca520e2cb
data/README.md CHANGED
@@ -6,7 +6,6 @@ A TCP client implementation with working timeout support.
6
6
  - Source: [github.com](https://github.com/mblumtritt/tcp-client)
7
7
  - Help: [rubydoc.info](https://rubydoc.info/github/mblumtritt/tcp-client/main/index)
8
8
 
9
-
10
9
  ## Description
11
10
 
12
11
  This Gem implements a TCP client with (optional) SSL support. It is an easy to use, versatile configurable client that can correctly handle time limits. Unlike other implementations, this client respects predefined/configurable time limits for each method (`connect`, `read`, `write`). Deadlines for a sequence of read/write actions can also be monitored.
@@ -63,7 +63,7 @@ class TCPClient
63
63
  end
64
64
 
65
65
  #
66
- # @return [String] text representation of self as "<host>:<port>"
66
+ # @return [String] text representation of self as "host:port"
67
67
  #
68
68
  def to_s
69
69
  return "[#{@hostname}]:#{@addrinfo.ip_port}" if @hostname.index(':') # IP6
@@ -132,7 +132,7 @@ class TCPClient
132
132
  if value.respond_to?(:to_hash)
133
133
  Hash[value.to_hash]
134
134
  elsif value.respond_to?(:to_h)
135
- Hash[value.to_h]
135
+ value.nil? ? nil : Hash[value.to_h]
136
136
  else
137
137
  value ? {} : nil
138
138
  end
@@ -229,7 +229,7 @@ class TCPClient
229
229
 
230
230
  #
231
231
  # @attribute [w] timeout
232
- # Shorthand to set maximum time in seconds for all timeut monitoring.
232
+ # Shorthand to set maximum time in seconds for all timeout monitoring.
233
233
  #
234
234
  # @return [Numeric] maximum time in seconds for any actwion
235
235
  # @return [nil] if all timeout monitoring should be disabled (default)
@@ -244,7 +244,7 @@ class TCPClient
244
244
 
245
245
  #
246
246
  # @attribute [w] timeout_error
247
- # Shorthand to set the exception class wich will by raised by any timeut.
247
+ # Shorthand to set the exception class wich will by raised by any timeout.
248
248
  #
249
249
  # @return [Class] exception class raised
250
250
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TCPClient
4
- VERSION = '0.9.2'
4
+ VERSION = '0.9.3'
5
5
  end
@@ -82,7 +82,7 @@ RSpec.describe TCPClient::Configuration do
82
82
  expect(configuration.keep_alive).to be false
83
83
  end
84
84
 
85
- it 'allows to configure reverse address lokup' do
85
+ it 'allows to configure reverse address lookup' do
86
86
  expect(configuration.reverse_lookup).to be false
87
87
  end
88
88
 
@@ -148,7 +148,7 @@ RSpec.describe TCPClient::Configuration do
148
148
  end
149
149
  end
150
150
 
151
- context 'with invalid attribte' do
151
+ context 'with invalid attribute' do
152
152
  it 'raises an error' do
153
153
  expect { TCPClient::Configuration.new(invalid: :value) }.to raise_error(
154
154
  TCPClient::UnknownAttributeError
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tcp-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Blumtritt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-04 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.2.28
132
+ rubygems_version: 3.2.32
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: A TCP client implementation with working timeout support.