tcp-client 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/tcp-client/address.rb +1 -1
- data/lib/tcp-client/configuration.rb +3 -3
- data/lib/tcp-client/version.rb +1 -1
- data/spec/tcp-client/configuration_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75811fed2b0735c2cac6a4e9671e138df88e6b8ada2be03a0d86b4b83b37b863
|
4
|
+
data.tar.gz: 9c715081912711178a0038d9af9832cf6c45e2620c2cff6dad899565de86be02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
data/lib/tcp-client/address.rb
CHANGED
@@ -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
|
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
|
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
|
#
|
data/lib/tcp-client/version.rb
CHANGED
@@ -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
|
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
|
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.
|
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-
|
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.
|
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.
|