tcp-client 0.0.8 → 0.0.9
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/README.md +1 -1
- data/lib/tcp-client/mixin/io_timeout.rb +2 -2
- data/lib/tcp-client/version.rb +1 -1
- data/rakefile.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bfc192ce3217cf36198c5b1455a16e4be9cca061f984f62d8803b88b6aca24c
|
4
|
+
data.tar.gz: 427adb5f70cf966da45adaf84a9aec99d88f1091dc1fd7ae398ea58f43f736f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f57ba3c454f390504717a88c2d42d409ed82e3967f730a10d414c9781c2a5a38ffd4518b421fe2dec5b00f95a89f587c00aa980507cf3d75db6feaf536010b04
|
7
|
+
data.tar.gz: 6bb29528b348b60de418de060067e9f55937107290901fb53cd6cdffbad42fe35050c12d2257c2410144ea936b35b511338697fecf444523ca5546d6a2aab47e
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ To install the gem globally use:
|
|
47
47
|
$ gem install tcp-client
|
48
48
|
```
|
49
49
|
|
50
|
-
After that you need only a single line of code in your project
|
50
|
+
After that you need only a single line of code in your project to have all tools on board:
|
51
51
|
|
52
52
|
```ruby
|
53
53
|
require 'tcp-client'
|
@@ -35,7 +35,7 @@ module IOTimeoutMixin
|
|
35
35
|
private
|
36
36
|
|
37
37
|
def read_all(nbytes)
|
38
|
-
return '' if
|
38
|
+
return '' if nbytes.zero?
|
39
39
|
result = ''
|
40
40
|
loop do
|
41
41
|
unless read = yield(nbytes - result.bytesize)
|
@@ -48,7 +48,7 @@ module IOTimeoutMixin
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def write_all(data)
|
51
|
-
return 0 if
|
51
|
+
return 0 if (size = data.bytesize).zero?
|
52
52
|
result = 0
|
53
53
|
loop do
|
54
54
|
written = yield(data)
|
data/lib/tcp-client/version.rb
CHANGED
data/rakefile.rb
CHANGED
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.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Blumtritt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: 1.3.6
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.7.7
|
106
|
+
rubygems_version: 3.0.1
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: A TCP client implementation with working timeout support.
|