tcp-client 0.2.2 → 0.2.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 +4 -4
- data/lib/tcp-client/default_configuration.rb +2 -4
- data/lib/tcp-client/mixin/io_with_deadline.rb +4 -0
- data/lib/tcp-client/version.rb +1 -1
- data/rakefile.rb +6 -6
- data/test/test_helper.rb +2 -4
- 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: 2791642003fb16623a27988401ff3bb532194032a5bbd4f62b853aae94790055
|
4
|
+
data.tar.gz: 030a2b3ebecf1334dea84e2c8f18aecd3b900c7c467c10c624c1354429a66195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4ef14d49cd323a418190e62bc190af01fcc9be1b7008b7fd27c8fa7b8779ae29947045a660080e9403ba1d932e1318a6f98c819006d816f91eb093caf6d7873
|
7
|
+
data.tar.gz: 29617e860ad0b419638b54a8258541ccf3c668530a38aa2e629badcb373b94df71c33e538d54faf12d732ffd51670e1ad57cc8fabcaac11bb2d4de3d28cd29b1
|
@@ -6,10 +6,8 @@ class TCPClient
|
|
6
6
|
class << self
|
7
7
|
attr_reader :default_configuration
|
8
8
|
|
9
|
-
def configure(options = {})
|
10
|
-
|
11
|
-
yield(cfg) if block_given?
|
12
|
-
@default_configuration = cfg
|
9
|
+
def configure(options = {}, &block)
|
10
|
+
@default_configuration = Configuration.create(options, &block)
|
13
11
|
end
|
14
12
|
end
|
15
13
|
|
@@ -55,6 +55,8 @@ module IOWithDeadlineMixin
|
|
55
55
|
return ret
|
56
56
|
end
|
57
57
|
end
|
58
|
+
rescue Errno::ETIMEDOUT
|
59
|
+
raise(exclass)
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
@@ -72,6 +74,8 @@ module IOWithDeadlineMixin
|
|
72
74
|
return ret
|
73
75
|
end
|
74
76
|
end
|
77
|
+
rescue Errno::ETIMEDOUT
|
78
|
+
raise(exclass)
|
75
79
|
end
|
76
80
|
end
|
77
81
|
|
data/lib/tcp-client/version.rb
CHANGED
data/rakefile.rb
CHANGED
@@ -6,12 +6,12 @@ require 'bundler/gem_tasks'
|
|
6
6
|
|
7
7
|
$stdout.sync = $stderr.sync = true
|
8
8
|
|
9
|
-
task(:default) { exec('rake --tasks') }
|
10
|
-
|
11
9
|
CLOBBER << 'prj'
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
task(:default) { exec('rake --tasks') }
|
12
|
+
|
13
|
+
Rake::TestTask.new(:test) do |task|
|
14
|
+
task.test_files = FileList['test/**/*_test.rb']
|
15
|
+
task.ruby_opts = %w[-w]
|
16
|
+
task.verbose = true
|
17
17
|
end
|
data/test/test_helper.rb
CHANGED
@@ -4,8 +4,6 @@ require 'minitest/autorun'
|
|
4
4
|
require 'minitest/parallel'
|
5
5
|
require_relative '../lib/tcp-client'
|
6
6
|
|
7
|
-
$stdout.sync = $stderr.sync = true
|
8
|
-
|
9
7
|
# this pseudo-server never reads or writes anything
|
10
|
-
|
11
|
-
Minitest.after_run {
|
8
|
+
PseudoServer = TCPServer.new('localhost', 1234)
|
9
|
+
Minitest.after_run { PseudoServer.close }
|
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.2.
|
4
|
+
version: 0.2.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-
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.2.
|
111
|
+
rubygems_version: 3.2.15
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: A TCP client implementation with working timeout support.
|