kgio 2.11.2 → 2.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0735f504f9595c877859b3ae950cc121c4543e113d5856bfccf3d6e0e8cfedc
4
- data.tar.gz: fcbf0aca84934d0873683baaa7da38ab05d5af622a631f9fc43b0dfa0faf4eb2
3
+ metadata.gz: 416c5d206ae053bec9b5476cf6b09fdc0c1ac902219a855da4bb72e27e430338
4
+ data.tar.gz: d843dadc2165a7402d7957eb8b9fb9e445f14d330bd173e3cde94d42bf61fb1c
5
5
  SHA512:
6
- metadata.gz: e3278fd6a4131b98a6b29b9a5713b82b9083b7d44dd802eeef8cdc1cc8e099c9b0e2277e315b3c0de9b5e360d56bdaa5d2017e81fd4651c6b0d4cc10e95c4cb6
7
- data.tar.gz: af06c0ade5b3238e653abab7ad50a200d808e14b5633928db36e6c007e2afd14632f0bd36183bb4a05d26a101ec46dc5f7a1d8252624781cc7aa13c1e46c0dd7
6
+ metadata.gz: 8fe6ed5d8c639441329955f8465217ba99ddf8619e0ebafa97ac23faba7730b6bbcc62689e0a46ba35adc183246c4599a7fe398bb55280651a24dba6ed249dab
7
+ data.tar.gz: 93c55467b97c95a87627f5a1c8462164086536727a43cea4f5b87c6795e3a87cfb68289773ee88d33fa2c053b2e5b488df647dab72318aea94afebb496f4f300
@@ -1,13 +1,11 @@
1
1
  ---
2
- cgit_url: https://bogomips.org/kgio.git
3
- git_url: git://bogomips.org/kgio.git
4
- ml_url: https://bogomips.org/kgio-public/
5
- rdoc_url: https://bogomips.org/kgio/
6
- public_email: kgio-public@bogomips.org
7
- private_email: kgio@bogomips.org
2
+ cgit_url: https://yhbt.net/kgio.git
3
+ git_url: git://yhbt.net/kgio.git
4
+ ml_url: https://yhbt.net/kgio-public/
5
+ rdoc_url: https://yhbt.net/kgio/
6
+ public_email: kgio-public@yhbt.net
8
7
  noindex:
9
8
  - LATEST
10
9
  - TODO
11
10
  nntp_url:
12
11
  - nntp://news.public-inbox.org/inbox.comp.lang.ruby.kgio
13
- - nntp://news.gmane.org/gmane.comp.lang.ruby.kgio.general
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v2.11.2
4
+ DEF_VER=v2.11.3
5
5
 
6
6
  LF='
7
7
  '
@@ -1,4 +1,4 @@
1
1
  all::
2
- RSYNC_DEST := bogomips.org:/srv/bogomips/kgio
2
+ RSYNC_DEST := yhbt.net:/srv/yhbt/kgio
3
3
  rfpackage := kgio
4
4
  include pkg.mk
data/HACKING CHANGED
@@ -2,14 +2,11 @@
2
2
 
3
3
  === Documentation
4
4
 
5
- We use the latest version of {olddoc}[https://80x24.org/olddoc/] as
6
- much as possible.
7
-
8
5
  Please wrap documentation at 72 characters-per-line or less (long URLs
9
6
  are exempt) so it is comfortably readable from terminals.
10
7
 
11
8
  When referencing mailing list posts, use
12
- <tt>https://bogomips.org/kgio-public/$MESSAGE_ID/</tt> if possible
9
+ <tt>https://yhbt.net/kgio-public/$MESSAGE_ID/</tt> if possible
13
10
  Message-ID remains searchable even if the archive becomes unavailable.
14
11
 
15
12
  === Code Compatibility
@@ -28,7 +25,7 @@ characters wide) and NOT the indentation style of Matz Ruby.
28
25
 
29
26
  Contributions are welcome in the form of patches, pull requests, code
30
27
  review, testing, documentation, user support or any other feedback. The
31
- {kgio mailing list}[mailto:kgio-public@bogomips.org] is the
28
+ {kgio mailing list}[mailto:kgio-public@yhbt.net] is the
32
29
  central coordination point for all user and developer feedback and bug
33
30
  reports.
34
31
 
data/ISSUES CHANGED
@@ -1,18 +1,14 @@
1
1
  = Issues
2
2
 
3
- The kgio {mailing list}[mailto:kgio-public@bogomips.org] is the best
3
+ The kgio {mailing list}[mailto:kgio-public@yhbt.net] is the best
4
4
  place to report bugs, submit patches and/or obtain support after you
5
- have searched the mailing list archives at https://bogomips.org/kgio-public/
6
- and {documentation}[https://bogomips.org/kgio/].
5
+ have searched the mailing list archives at https://yhbt.net/kgio-public/
6
+ and {documentation}[https://yhbt.net/kgio/].
7
7
 
8
8
  * Do not {top post}[http://catb.org/jargon/html/T/top-post.html] in replies
9
9
  * Quote only the relevant portions of the message you're replying to
10
10
  * Do not send any HTML mail at all
11
11
 
12
- If your issue is of a sensitive nature or you're just shy in public,
13
- then feel free to email us privately at mailto:kgio@bogomips.org
14
- instead and your issue will be handled discreetly.
15
-
16
12
  If you don't get a response within a few days, we may have forgotten
17
13
  about it so feel free to ask again.
18
14
 
@@ -24,11 +20,10 @@ guidelines for patch submission.
24
20
 
25
21
  == Mailing List Info
26
22
 
27
- * subscribe: mailto:kgio-public+subscribe@bogomips.org
28
- * post: mailto:kgio-public@bogomips.org
29
- * private: mailto:kgio@bogomips.org
23
+ * subscribe: mailto:kgio-public+subscribe@yhbt.net
24
+ * post: mailto:kgio-public@yhbt.net
30
25
 
31
26
  == Mailing List Archives
32
27
 
33
- * https://bogomips.org/kgio-public/
28
+ * https://yhbt.net/kgio-public/
34
29
  * nntp://news.public-inbox.org/inbox.comp.lang.ruby.kgio
data/README CHANGED
@@ -39,13 +39,13 @@ You may install it via RubyGems.org:
39
39
  You can get the latest source via git from the following locations
40
40
  (these versions may not be stable):
41
41
 
42
- git://bogomips.org/kgio.git
42
+ git://yhbt.net/kgio.git
43
43
  git://repo.or.cz/kgio.git (mirror)
44
44
 
45
45
  You may browse the code from the web and download the latest snapshot
46
46
  tarballs here:
47
47
 
48
- * https://bogomips.org/kgio.git
48
+ * https://yhbt.net/kgio.git
49
49
  * http://repo.or.cz/w/kgio.git (gitweb)
50
50
 
51
51
  See the HACKING guide on how to contribute and build prerelease gems
@@ -55,7 +55,7 @@ from git.
55
55
 
56
56
  All feedback (bug reports, user/development dicussion, patches, pull
57
57
  requests) go to the mailing list/newsgroup. See the ISSUES document for
58
- information on the {kgio mailing list}[mailto:kgio-public@bogomips.org]
58
+ information on the {kgio mailing list}[mailto:kgio-public@yhbt.net]
59
59
 
60
60
  For the latest on kgio releases, you may check our NEWS page (and
61
61
  subscribe to our Atom feed).
@@ -1,23 +1,26 @@
1
1
  ENV["VERSION"] or abort "VERSION= must be specified"
2
2
  manifest = File.readlines('.manifest').map! { |x| x.chomp! }
3
- require 'olddoc'
4
- extend Olddoc::Gemspec
5
- name, summary, title = readme_metadata
6
3
 
7
4
  Gem::Specification.new do |s|
8
5
  s.name = %q{kgio}
9
6
  s.version = ENV["VERSION"].dup
10
- s.homepage = Olddoc.config['rdoc_url']
11
- s.authors = ["#{name} hackers"]
12
- s.description = readme_description
13
- s.email = %q{kgio-public@bogomips.org}
14
- s.extra_rdoc_files = extra_rdoc_files(manifest)
7
+ s.homepage = 'https://yhbt.net/kgio/'
8
+ s.authors = ['kgio hackers']
9
+ s.description = <<EOF
10
+ This is a legacy project, do not use it for new projects. Ruby
11
+ 2.3 and later should make this obsolete. kgio provides
12
+ non-blocking I/O methods for Ruby without raising exceptions on
13
+ EAGAIN and EINPROGRESS.
14
+ EOF
15
+ s.email = %q{kgio-public@yhbt.net}
16
+ s.extra_rdoc_files = IO.readlines('.document').map!(&:chomp!).keep_if do |f|
17
+ File.exist?(f)
18
+ end
15
19
  s.files = manifest
16
- s.summary = summary
20
+ s.summary = 'kinder, gentler I/O for Ruby'
17
21
  s.test_files = Dir['test/test_*.rb']
18
22
  s.extensions = %w(ext/kgio/extconf.rb)
19
23
 
20
- s.add_development_dependency('olddoc', '~> 1.0')
21
24
  s.add_development_dependency('test-unit', '~> 3.0')
22
25
  # s.add_development_dependency('strace_me', '~> 1.0') # Linux only
23
26
 
data/pkg.mk CHANGED
@@ -60,7 +60,7 @@ doc:: .document .olddoc.yml $(pkg_extra) $(PLACEHOLDERS)
60
60
  -find lib -type f -name '*.rbc' -exec rm -f '{}' ';'
61
61
  -find ext -type f -name '*.rbc' -exec rm -f '{}' ';'
62
62
  $(RM) -r doc
63
- $(RDOC) -f oldweb
63
+ $(RDOC) -f dark216
64
64
  $(OLDDOC) merge
65
65
  install -m644 COPYING doc/COPYING
66
66
  install -m644 NEWS doc/NEWS
@@ -86,7 +86,7 @@ fix-perms:
86
86
  gem: $(pkggem)
87
87
 
88
88
  install-gem: $(pkggem)
89
- gem install $(CURDIR)/$<
89
+ gem install --local $(CURDIR)/$<
90
90
 
91
91
  $(pkggem): manifest fix-perms
92
92
  gem build $(rfpackage).gemspec
@@ -166,6 +166,7 @@ module LibReadWriteTest
166
166
  rescue EOFError
167
167
  break
168
168
  rescue => e
169
+ warn "#{e.message} (#{e.class})"
169
170
  end while true
170
171
  dig.hexdigest
171
172
  end
@@ -203,6 +204,7 @@ module LibReadWriteTest
203
204
  rescue EOFError
204
205
  break
205
206
  rescue => e
207
+ warn "#{e.message} (#{e.class})"
206
208
  end while true
207
209
  dig.hexdigest
208
210
  end
@@ -20,6 +20,7 @@ module LibServerAccept
20
20
  b = @srv.kgio_tryaccept
21
21
  assert_kind_of Kgio::Socket, b
22
22
  assert_equal @host, b.kgio_addr
23
+ a.close
23
24
  end
24
25
 
25
26
  def test_tryaccept_flags
@@ -28,6 +29,7 @@ module LibServerAccept
28
29
  b = @srv.kgio_tryaccept nil, 0
29
30
  assert_kind_of Kgio::Socket, b
30
31
  assert_equal 0, b.fcntl(Fcntl::F_GETFD)
32
+ a.close
31
33
  end
32
34
 
33
35
  def test_blocking_accept_flags
@@ -36,6 +38,7 @@ module LibServerAccept
36
38
  b = @srv.kgio_accept nil, 0
37
39
  assert_kind_of Kgio::Socket, b
38
40
  assert_equal 0, b.fcntl(Fcntl::F_GETFD)
41
+ a.close
39
42
  end
40
43
 
41
44
  def test_tryaccept_fail
@@ -44,7 +47,7 @@ module LibServerAccept
44
47
 
45
48
  def test_blocking_accept
46
49
  t0 = Time.now
47
- pid = fork { sleep 1; a = client_connect; sleep }
50
+ pid = fork { sleep 1; a = client_connect; sleep; a.close }
48
51
  b = @srv.kgio_accept
49
52
  elapsed = Time.now - t0
50
53
  assert_kind_of Kgio::Socket, b
@@ -57,7 +60,7 @@ module LibServerAccept
57
60
  def test_blocking_accept_with_nonblock_socket
58
61
  @srv.nonblock = true
59
62
  t0 = Time.now
60
- pid = fork { sleep 1; a = client_connect; sleep }
63
+ pid = fork { sleep 1; a = client_connect; sleep; a.close }
61
64
  b = @srv.kgio_accept
62
65
  elapsed = Time.now - t0
63
66
  assert_kind_of Kgio::Socket, b
@@ -67,7 +70,7 @@ module LibServerAccept
67
70
  assert elapsed >= 1, "elapsed: #{elapsed}"
68
71
 
69
72
  t0 = Time.now
70
- pid = fork { sleep 6; a = client_connect; sleep }
73
+ pid = fork { sleep 6; a = client_connect; sleep; a.close }
71
74
  b = @srv.kgio_accept
72
75
  elapsed = Time.now - t0
73
76
  assert_kind_of Kgio::Socket, b
@@ -77,7 +80,7 @@ module LibServerAccept
77
80
  assert elapsed >= 6, "elapsed: #{elapsed}"
78
81
 
79
82
  t0 = Time.now
80
- pid = fork { sleep 1; a = client_connect; sleep }
83
+ pid = fork { sleep 1; a = client_connect; sleep; a.close }
81
84
  b = @srv.kgio_accept
82
85
  elapsed = Time.now - t0
83
86
  assert_kind_of Kgio::Socket, b
@@ -30,33 +30,35 @@ class TestAcceptClass < Test::Unit::TestCase
30
30
  @host = ENV["TEST_HOST"] || '127.0.0.1'
31
31
  @srv = Kgio::TCPServer.new(@host, 0)
32
32
  @port = @srv.addr[1]
33
+ socks = []
33
34
 
34
35
  Kgio.accept_class = Kgio::TCPSocket
35
- client = TCPSocket.new(@host, @port)
36
+ socks << TCPSocket.new(@host, @port)
36
37
  assert_instance_of Kgio::TCPSocket, @srv.kgio_accept
37
- client = TCPSocket.new(@host, @port)
38
+ socks << TCPSocket.new(@host, @port)
38
39
  IO.select([@srv])
39
40
  assert_instance_of Kgio::TCPSocket, @srv.kgio_tryaccept
40
41
 
41
42
  Kgio.accept_class = nil
42
- client = TCPSocket.new(@host, @port)
43
+ socks << TCPSocket.new(@host, @port)
43
44
  assert_instance_of Kgio::Socket, @srv.kgio_accept
44
- client = TCPSocket.new(@host, @port)
45
+ socks << TCPSocket.new(@host, @port)
45
46
  IO.select([@srv])
46
47
  assert_instance_of Kgio::Socket, @srv.kgio_tryaccept
47
48
 
48
49
  Kgio.accept_class = Kgio::UNIXSocket
49
- client = TCPSocket.new(@host, @port)
50
+ socks << TCPSocket.new(@host, @port)
50
51
  assert_instance_of Kgio::UNIXSocket, @srv.kgio_accept
51
- client = TCPSocket.new(@host, @port)
52
+ socks << TCPSocket.new(@host, @port)
52
53
  IO.select([@srv])
53
54
  assert_instance_of Kgio::UNIXSocket, @srv.kgio_tryaccept
54
55
 
55
- client = TCPSocket.new(@host, @port)
56
+ socks << TCPSocket.new(@host, @port)
56
57
  assert_instance_of FooSocket, @srv.kgio_accept(FooSocket)
57
58
 
58
- client = TCPSocket.new(@host, @port)
59
+ socks << TCPSocket.new(@host, @port)
59
60
  IO.select([@srv])
60
61
  assert_instance_of FooSocket, @srv.kgio_tryaccept(FooSocket)
62
+ socks.each(&:close)
61
63
  end
62
64
  end
@@ -13,5 +13,6 @@ class TestConnectFDLeak < Test::Unit::TestCase
13
13
  sock = Kgio::UNIXSocket.new(path)
14
14
  rescue Errno::ENOENT
15
15
  end while (nr += 1) < 10000
16
+ sock.close if sock
16
17
  end
17
18
  end
@@ -15,5 +15,6 @@ class TestKgioAddr < Test::Unit::TestCase
15
15
  s = accepted.kgio_addr!
16
16
  assert_equal addr, s
17
17
  assert_equal addr, accepted.instance_variable_get(:@kgio_addr)
18
+ client.close
18
19
  end
19
20
  end
@@ -43,7 +43,6 @@ class TestPoll < Test::Unit::TestCase
43
43
  end
44
44
 
45
45
  def test_poll_close
46
- foo = nil
47
46
  thr = Thread.new { sleep 0.100; @wr.close }
48
47
  t0 = Time.now
49
48
  res = Kgio.poll({@rd => Kgio::POLLIN})
@@ -55,7 +54,6 @@ class TestPoll < Test::Unit::TestCase
55
54
 
56
55
  def test_signal_close
57
56
  orig = trap(:USR1) { @rd.close }
58
- res = nil
59
57
  thr = Thread.new { sleep 0.100; Process.kill(:USR1, $$) }
60
58
  t0 = Time.now
61
59
  assert_raises(IOError) do
@@ -65,8 +63,8 @@ class TestPoll < Test::Unit::TestCase
65
63
  diff = Time.now - t0
66
64
  thr.join
67
65
  assert diff >= 0.010, "diff=#{diff}"
68
- ensure
69
- trap(:USR1, orig)
66
+ ensure
67
+ trap(:USR1, orig)
70
68
  end
71
69
 
72
70
  def test_poll_EINTR
@@ -83,8 +81,8 @@ class TestPoll < Test::Unit::TestCase
83
81
  assert_nil res
84
82
  assert diff >= 1.0, "diff=#{diff}"
85
83
  assert ok
86
- ensure
87
- trap(:USR1, orig)
84
+ ensure
85
+ trap(:USR1, orig)
88
86
  end
89
87
 
90
88
  def test_poll_signal_torture
@@ -37,6 +37,8 @@ class TestKgioSyssend < Test::Unit::TestCase
37
37
  # blocking
38
38
  th = Thread.new { loop { acc.kgio_syssend("ZZZZ", 0) } }
39
39
  assert_nil th.join(0.1)
40
+ th.kill
41
+ assert th.join(10), 'thread should be killed'
40
42
  ensure
41
43
  [ srv, acc, client ].each { |io| io.close if io }
42
44
  end
@@ -3,6 +3,7 @@ require './test/lib_read_write'
3
3
  begin
4
4
  tmp = TCPServer.new(ENV["TEST_HOST6"] || '::1', 0)
5
5
  ipv6_enabled = true
6
+ tmp.close
6
7
  rescue => e
7
8
  warn "skipping IPv6 tests, host does not seem to be IPv6 enabled:"
8
9
  warn " #{e.class}: #{e}"
@@ -59,8 +59,9 @@ class TestTryopen < Test::Unit::TestCase
59
59
  tmp.close!
60
60
  file = Kgio::File.tryopen(path, IO::RDWR|IO::CREAT, 0000)
61
61
  assert_equal 0100000, File.stat(path).mode
62
- ensure
63
- File.unlink path
62
+ file.close
63
+ ensure
64
+ File.unlink path
64
65
  end
65
66
 
66
67
  require "benchmark"
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kgio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.2
4
+ version: 2.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kgio hackers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-30 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: olddoc
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: test-unit
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -38,12 +24,12 @@ dependencies:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
26
  version: '3.0'
41
- description: |-
27
+ description: |
42
28
  This is a legacy project, do not use it for new projects. Ruby
43
29
  2.3 and later should make this obsolete. kgio provides
44
30
  non-blocking I/O methods for Ruby without raising exceptions on
45
31
  EAGAIN and EINPROGRESS.
46
- email: kgio-public@bogomips.org
32
+ email: kgio-public@yhbt.net
47
33
  executables: []
48
34
  extensions:
49
35
  - ext/kgio/extconf.rb
@@ -55,7 +41,6 @@ extra_rdoc_files:
55
41
  - LATEST
56
42
  - ISSUES
57
43
  - HACKING
58
- - lib/kgio.rb
59
44
  - ext/kgio/accept.c
60
45
  - ext/kgio/autopush.c
61
46
  - ext/kgio/connect.c
@@ -134,7 +119,7 @@ files:
134
119
  - test/test_unix_connect.rb
135
120
  - test/test_unix_server.rb
136
121
  - test/test_unix_server_read_client_write.rb
137
- homepage: https://bogomips.org/kgio/
122
+ homepage: https://yhbt.net/kgio/
138
123
  licenses:
139
124
  - LGPL-2.1+
140
125
  metadata: {}
@@ -153,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
138
  - !ruby/object:Gem::Version
154
139
  version: '0'
155
140
  requirements: []
156
- rubyforge_project:
157
- rubygems_version: 2.7.3
141
+ rubygems_version: 3.0.2
158
142
  signing_key:
159
143
  specification_version: 4
160
144
  summary: kinder, gentler I/O for Ruby