nio4r 2.7.0 → 2.7.4
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
- checksums.yaml.gz.sig +0 -0
- data/changes.md +12 -1
- data/ext/nio4r/nio4r_ext.c +4 -0
- data/ext/nio4r/org/nio4r/ByteBuffer.java +1 -1
- data/ext/nio4r/org/nio4r/Monitor.java +2 -2
- data/ext/nio4r/org/nio4r/Selector.java +2 -2
- data/lib/nio/version.rb +2 -2
- data/lib/nio4r.rb +2 -0
- data/license.md +5 -2
- data/readme.md +5 -5
- data.tar.gz.sig +3 -0
- metadata +92 -75
- metadata.gz.sig +0 -0
- data/.github/workflows/workflow.yml +0 -61
- data/.gitignore +0 -21
- data/.mailmap +0 -16
- data/.rspec +0 -4
- data/.rubocop.yml +0 -100
- data/Gemfile +0 -19
- data/Rakefile +0 -8
- data/examples/echo_server.rb +0 -54
- data/logo.png +0 -0
- data/nio4r.gemspec +0 -43
- data/rakelib/extension.rake +0 -14
- data/rakelib/rspec.rake +0 -9
- data/rakelib/rubocop.rake +0 -5
- data/spec/nio/acceptables_spec.rb +0 -36
- data/spec/nio/bytebuffer_spec.rb +0 -360
- data/spec/nio/monitor_spec.rb +0 -169
- data/spec/nio/selectables/pipe_spec.rb +0 -53
- data/spec/nio/selectables/ssl_socket_spec.rb +0 -199
- data/spec/nio/selectables/tcp_socket_spec.rb +0 -108
- data/spec/nio/selectables/udp_socket_spec.rb +0 -55
- data/spec/nio/selector_spec.rb +0 -252
- data/spec/spec_helper.rb +0 -23
- data/spec/support/selectable_examples.rb +0 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8314c9539cda7366afdf81069ac061dc9ee56985a777b17af13e9d35b613d998
|
4
|
+
data.tar.gz: a8616d47698bd714649278ad575a4038fafcab6a4165978278683214ea0d3898
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed28a8e9921b297f33c4247440c647a02bccd5ee7325ded2a712dfb4aeb9df34d61e9ebe8e0bc69b413dff78d313d309318291deade808a4b80e02400d5980d
|
7
|
+
data.tar.gz: f0d693629b56cdc3c85adf2200bb982b42df41eb7ce9aea9fc2ad4896afc9713db96c55950440118f242fbd82af0089da6ca8531e6ef6ea6b7b16c130101a631
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/changes.md
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
## 2.
|
1
|
+
## 2.7.2
|
2
|
+
|
3
|
+
* Modernize gem (list all authors, etc).
|
4
|
+
* Drop official support for Ruby 2.4.
|
5
|
+
* Fix JRuby release version.
|
6
|
+
|
7
|
+
## 2.7.1
|
8
|
+
|
9
|
+
* Fix license specification.
|
10
|
+
* Fix JRuby build warnings.
|
11
|
+
|
12
|
+
## 2.7.0
|
2
13
|
|
3
14
|
* Convert NIO objects to TypedData API.
|
4
15
|
|
data/ext/nio4r/nio4r_ext.c
CHANGED
@@ -27,7 +27,7 @@ created by Upekshej
|
|
27
27
|
*/
|
28
28
|
public class ByteBuffer extends RubyObject {
|
29
29
|
private static final long serialVersionUID = -6903439483039149324L;
|
30
|
-
private java.nio.ByteBuffer byteBuffer;
|
30
|
+
private transient java.nio.ByteBuffer byteBuffer;
|
31
31
|
|
32
32
|
public static RaiseException newOverflowError(ThreadContext context, String message) {
|
33
33
|
RubyClass klass = context.runtime.getModule("NIO").getClass("ByteBuffer").getClass("OverflowError");
|
@@ -14,9 +14,9 @@ import org.jruby.runtime.builtin.IRubyObject;
|
|
14
14
|
|
15
15
|
public class Monitor extends RubyObject {
|
16
16
|
private static final long serialVersionUID = -3733782997115074794L;
|
17
|
-
private SelectionKey key;
|
17
|
+
private transient SelectionKey key;
|
18
18
|
private RubyIO io;
|
19
|
-
private IRubyObject interests, selector, value, closed;
|
19
|
+
private transient IRubyObject interests, selector, value, closed;
|
20
20
|
|
21
21
|
public Monitor(final Ruby ruby, RubyClass rubyClass) {
|
22
22
|
super(ruby, rubyClass);
|
@@ -22,7 +22,7 @@ import org.jruby.util.io.OpenFile;
|
|
22
22
|
|
23
23
|
public class Selector extends RubyObject {
|
24
24
|
private static final long serialVersionUID = -14562818539414873L;
|
25
|
-
private java.nio.channels.Selector selector;
|
25
|
+
private transient java.nio.channels.Selector selector;
|
26
26
|
private HashMap<SelectableChannel,SelectionKey> cancelledKeys;
|
27
27
|
private volatile boolean wakeupFired;
|
28
28
|
|
@@ -234,7 +234,7 @@ public class Selector extends RubyObject {
|
|
234
234
|
|
235
235
|
cancelKeys();
|
236
236
|
try {
|
237
|
-
context.getThread().beforeBlockingCall();
|
237
|
+
context.getThread().beforeBlockingCall(context);
|
238
238
|
if(timeout.isNil()) {
|
239
239
|
result = this.selector.select();
|
240
240
|
} else {
|
data/lib/nio/version.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
4
|
# Copyright, 2011-2018, by Tony Arcieri.
|
5
|
-
# Copyright, 2018-
|
5
|
+
# Copyright, 2018-2024, by Samuel Williams.
|
6
6
|
# Copyright, 2023, by Tsimnuj Hawj.
|
7
7
|
|
8
8
|
module NIO
|
9
|
-
VERSION = "2.7.
|
9
|
+
VERSION = "2.7.4"
|
10
10
|
end
|
data/lib/nio4r.rb
CHANGED
data/license.md
CHANGED
@@ -29,7 +29,7 @@ Copyright, 2017, by Usaku Nakamura.
|
|
29
29
|
Copyright, 2017-2022, by Gregory Longtin.
|
30
30
|
Copyright, 2017, by Lars Kanis.
|
31
31
|
Copyright, 2017, by Tomoya Ishida.
|
32
|
-
Copyright, 2018-
|
32
|
+
Copyright, 2018-2024, by Samuel Williams.
|
33
33
|
Copyright, 2019, by Cédric Boutillier.
|
34
34
|
Copyright, 2019-2020, by Benoit Daloze.
|
35
35
|
Copyright, 2019, by Jesús Burgos Maciá.
|
@@ -45,9 +45,12 @@ Copyright, 2020-2021, by Joao Fernandes.
|
|
45
45
|
Copyright, 2021, by Jun Jiang.
|
46
46
|
Copyright, 2021, by Pavel Lobashov.
|
47
47
|
Copyright, 2021, by Jeffrey Martin.
|
48
|
-
Copyright, 2023, by Pavel Rosický.
|
48
|
+
Copyright, 2023-2024, by Pavel Rosický.
|
49
49
|
Copyright, 2023, by Tsimnuj Hawj.
|
50
50
|
Copyright, 2023, by Phillip Aldridge.
|
51
|
+
Copyright, 2023, by Maxime Demolin.
|
52
|
+
Copyright, 2023-2024, by Vít Ondruch.
|
53
|
+
Copyright, 2023, by Jean Boussier.
|
51
54
|
|
52
55
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
53
56
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
# 
|
2
2
|
|
3
|
-
[](https://github.com/socketry/nio4r/actions?query=workflow:nio4r)
|
5
|
-
[](https://codeclimate.com/github/socketry/nio4r)
|
6
|
-
[](http://www.rubydoc.info/gems/nio4r/2.2.0)
|
3
|
+
[](https://github.com/socketry/nio4r/actions?workflow=Test)
|
7
4
|
|
8
5
|
**New I/O for Ruby (nio4r)**: cross-platform asynchronous I/O primitives for
|
9
6
|
scalable network clients and servers. Modeled after the Java NIO API, but
|
@@ -30,7 +27,6 @@ writing.
|
|
30
27
|
|
31
28
|
## Supported platforms
|
32
29
|
|
33
|
-
- Ruby 2.4
|
34
30
|
- Ruby 2.5
|
35
31
|
- Ruby 2.6
|
36
32
|
- Ruby 2.7
|
@@ -68,6 +64,10 @@ to maintain a large codebase.
|
|
68
64
|
|
69
65
|
## Releases
|
70
66
|
|
67
|
+
Bump the version first:
|
68
|
+
|
69
|
+
bundle exec bake gem:release:version:patch
|
70
|
+
|
71
71
|
### CRuby
|
72
72
|
|
73
73
|
rake clean
|
data.tar.gz.sig
ADDED
metadata
CHANGED
@@ -1,61 +1,102 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nio4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
|
+
- Samuel Williams
|
9
|
+
- Olle Jonsson
|
10
|
+
- Gregory Longtin
|
11
|
+
- Tiago Cardoso
|
12
|
+
- Joao Fernandes
|
13
|
+
- Thomas Dziedzic
|
14
|
+
- Boaz Segev
|
15
|
+
- Logan Bowers
|
16
|
+
- Pedro Paiva
|
17
|
+
- Jun Aruga
|
18
|
+
- Omer Katz
|
19
|
+
- Upekshe Jayasekera
|
20
|
+
- Tim Carey-Smith
|
21
|
+
- Benoit Daloze
|
22
|
+
- Sergey Avseyev
|
23
|
+
- Tomoya Ishida
|
24
|
+
- Usaku Nakamura
|
25
|
+
- Cédric Boutillier
|
26
|
+
- Daniel Berger
|
27
|
+
- Dirkjan Bussink
|
28
|
+
- Hiroshi Shibata
|
29
|
+
- Jesús Burgos Maciá
|
30
|
+
- Luis Lavena
|
31
|
+
- Pavel Rosický
|
32
|
+
- Sadayuki Furuhashi
|
33
|
+
- Stephen von Takach
|
34
|
+
- Vladimir Kochnev
|
35
|
+
- Vít Ondruch
|
36
|
+
- Anatol Pomozov
|
37
|
+
- Bernd Ahlers
|
38
|
+
- Charles Oliver Nutter
|
39
|
+
- Denis Washington
|
40
|
+
- Elad Eyal
|
41
|
+
- Jean byroot Boussier
|
42
|
+
- Jeffrey Martin
|
43
|
+
- John Thornton
|
44
|
+
- Jun Jiang
|
45
|
+
- Lars Kanis
|
46
|
+
- Marek Kowalcze
|
47
|
+
- Maxime Demolin
|
48
|
+
- Orien Madgwick
|
49
|
+
- Pavel Lobashov
|
50
|
+
- Per Lundberg
|
51
|
+
- Phillip Aldridge
|
52
|
+
- Ravil Bayramgalin
|
53
|
+
- Shannon Skipper
|
54
|
+
- Tao Luo
|
55
|
+
- Thomas Kuntz
|
56
|
+
- Tsimnuj Hawj
|
57
|
+
- Zhang Kang
|
8
58
|
autorequire:
|
9
59
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
60
|
+
cert_chain:
|
61
|
+
- |
|
62
|
+
-----BEGIN CERTIFICATE-----
|
63
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
64
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
65
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
66
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
67
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
68
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
69
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
70
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
71
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
72
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
73
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
74
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
75
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
76
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
77
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
78
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
79
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
80
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
81
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
82
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
83
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
84
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
85
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
86
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
87
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
88
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
89
|
+
-----END CERTIFICATE-----
|
90
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
91
|
+
dependencies: []
|
92
|
+
description:
|
43
93
|
email:
|
44
|
-
- bascule@gmail.com
|
45
94
|
executables: []
|
46
95
|
extensions:
|
47
96
|
- ext/nio4r/extconf.rb
|
48
97
|
extra_rdoc_files: []
|
49
98
|
files:
|
50
|
-
- ".github/workflows/workflow.yml"
|
51
|
-
- ".gitignore"
|
52
|
-
- ".mailmap"
|
53
|
-
- ".rspec"
|
54
|
-
- ".rubocop.yml"
|
55
|
-
- Gemfile
|
56
|
-
- Rakefile
|
57
99
|
- changes.md
|
58
|
-
- examples/echo_server.rb
|
59
100
|
- ext/libev/Changes
|
60
101
|
- ext/libev/LICENSE
|
61
102
|
- ext/libev/README
|
@@ -90,32 +131,18 @@ files:
|
|
90
131
|
- lib/nio/version.rb
|
91
132
|
- lib/nio4r.rb
|
92
133
|
- license.md
|
93
|
-
- logo.png
|
94
|
-
- nio4r.gemspec
|
95
|
-
- rakelib/extension.rake
|
96
|
-
- rakelib/rspec.rake
|
97
|
-
- rakelib/rubocop.rake
|
98
134
|
- readme.md
|
99
|
-
- spec/nio/acceptables_spec.rb
|
100
|
-
- spec/nio/bytebuffer_spec.rb
|
101
|
-
- spec/nio/monitor_spec.rb
|
102
|
-
- spec/nio/selectables/pipe_spec.rb
|
103
|
-
- spec/nio/selectables/ssl_socket_spec.rb
|
104
|
-
- spec/nio/selectables/tcp_socket_spec.rb
|
105
|
-
- spec/nio/selectables/udp_socket_spec.rb
|
106
|
-
- spec/nio/selector_spec.rb
|
107
|
-
- spec/spec_helper.rb
|
108
|
-
- spec/support/selectable_examples.rb
|
109
135
|
homepage: https://github.com/socketry/nio4r
|
110
136
|
licenses:
|
111
|
-
- MIT
|
137
|
+
- MIT
|
138
|
+
- BSD-2-Clause
|
112
139
|
metadata:
|
113
140
|
bug_tracker_uri: https://github.com/socketry/nio4r/issues
|
114
141
|
changelog_uri: https://github.com/socketry/nio4r/blob/main/changes.md
|
115
|
-
documentation_uri: https://www.rubydoc.info/gems/nio4r
|
116
|
-
source_code_uri: https://github.com/socketry/nio4r/tree/v2.6.1
|
117
|
-
wiki_uri: https://github.com/socketry/nio4r/wiki
|
142
|
+
documentation_uri: https://www.rubydoc.info/gems/nio4r
|
118
143
|
funding_uri: https://github.com/sponsors/ioquatix/
|
144
|
+
source_code_uri: https://github.com/socketry/nio4r.git
|
145
|
+
wiki_uri: https://github.com/socketry/nio4r/wiki
|
119
146
|
post_install_message:
|
120
147
|
rdoc_options: []
|
121
148
|
require_paths:
|
@@ -124,25 +151,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
151
|
requirements:
|
125
152
|
- - ">="
|
126
153
|
- !ruby/object:Gem::Version
|
127
|
-
version: '2.
|
154
|
+
version: '2.6'
|
128
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
156
|
requirements:
|
130
157
|
- - ">="
|
131
158
|
- !ruby/object:Gem::Version
|
132
159
|
version: '0'
|
133
160
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.5.11
|
135
162
|
signing_key:
|
136
163
|
specification_version: 4
|
137
164
|
summary: New IO for Ruby
|
138
|
-
test_files:
|
139
|
-
- spec/nio/acceptables_spec.rb
|
140
|
-
- spec/nio/bytebuffer_spec.rb
|
141
|
-
- spec/nio/monitor_spec.rb
|
142
|
-
- spec/nio/selectables/pipe_spec.rb
|
143
|
-
- spec/nio/selectables/ssl_socket_spec.rb
|
144
|
-
- spec/nio/selectables/tcp_socket_spec.rb
|
145
|
-
- spec/nio/selectables/udp_socket_spec.rb
|
146
|
-
- spec/nio/selector_spec.rb
|
147
|
-
- spec/spec_helper.rb
|
148
|
-
- spec/support/selectable_examples.rb
|
165
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
@@ -1,61 +0,0 @@
|
|
1
|
-
name: nio4r
|
2
|
-
|
3
|
-
on: [push, pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
name: >-
|
8
|
-
${{matrix.os}}, ${{matrix.ruby}}
|
9
|
-
env:
|
10
|
-
CI: true
|
11
|
-
TESTOPTS: -v
|
12
|
-
|
13
|
-
runs-on: ${{matrix.os}}
|
14
|
-
strategy:
|
15
|
-
fail-fast: false
|
16
|
-
matrix:
|
17
|
-
os:
|
18
|
-
- ubuntu-22.04
|
19
|
-
- macos-11
|
20
|
-
- windows-2022
|
21
|
-
ruby:
|
22
|
-
- "2.4"
|
23
|
-
- "2.5"
|
24
|
-
- "2.6"
|
25
|
-
- "2.7"
|
26
|
-
- "3.0"
|
27
|
-
- "3.1"
|
28
|
-
- "3.2"
|
29
|
-
- "head"
|
30
|
-
- "jruby"
|
31
|
-
- "truffleruby"
|
32
|
-
include:
|
33
|
-
- {os: ubuntu-20.04, ruby: "3.2"}
|
34
|
-
- {os: windows-2019, ruby: "3.2"}
|
35
|
-
- {os: windows-2022, ruby: ucrt}
|
36
|
-
exclude:
|
37
|
-
- {os: windows-2022, ruby: head}
|
38
|
-
- {os: windows-2022, ruby: jruby}
|
39
|
-
- {os: windows-2022, ruby: truffleruby}
|
40
|
-
|
41
|
-
steps:
|
42
|
-
- uses: actions/checkout@v3
|
43
|
-
|
44
|
-
- name: set JAVA_HOME
|
45
|
-
if: |
|
46
|
-
startsWith(matrix.ruby, 'jruby')
|
47
|
-
shell: bash
|
48
|
-
run: |
|
49
|
-
echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV
|
50
|
-
|
51
|
-
- uses: ruby/setup-ruby@v1
|
52
|
-
with:
|
53
|
-
ruby-version: ${{matrix.ruby}}
|
54
|
-
bundler-cache: true
|
55
|
-
|
56
|
-
- name: Compile
|
57
|
-
run: bundle exec rake compile
|
58
|
-
|
59
|
-
- name: Test
|
60
|
-
run: bundle exec rake spec
|
61
|
-
timeout-minutes: 10
|
data/.gitignore
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
|
-
_yardoc
|
9
|
-
coverage
|
10
|
-
doc/
|
11
|
-
lib/bundler/man
|
12
|
-
pkg
|
13
|
-
rdoc
|
14
|
-
spec/reports
|
15
|
-
test/tmp
|
16
|
-
test/version_tmp
|
17
|
-
tmp
|
18
|
-
lib/nio4r_ext.*
|
19
|
-
ext/**/*.o
|
20
|
-
ext/**/nio4r_ext.*
|
21
|
-
.rspec_status
|
data/.mailmap
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
Sadayuki Furuhashi <frsyuki@users.sourceforge.jp>
|
2
|
-
Shannon Skipper <shannonskipper@gmail.com>
|
3
|
-
Anatol Pomozov <anatol.pomozov@gmail.com>
|
4
|
-
Hiroshi Shibata <shibata.hiroshi@gmail.com>
|
5
|
-
John Thornton <ubergeek3141@gmail.com>
|
6
|
-
Upekshe Jayasekera <usmj000@gmail.com>
|
7
|
-
Upekshe Jayasekera <upekshej.11@cse.mrt.ac.lk>
|
8
|
-
Usaku Nakamura <usa@garbagecollect.jp>
|
9
|
-
Tomoya Ishida <tomoyapenguin@gmail.com>
|
10
|
-
Tiago Cardoso <cardoso_tiago@hotmail.com>
|
11
|
-
Ravil Bayramgalin <brainopia@evilmartians.com>
|
12
|
-
Gregory Longtin <Greg.mpls@gmail.com>
|
13
|
-
Gregory Longtin <Greg.mpls@gmail.com> <MSP-Greg@users.noreply.github.com>
|
14
|
-
Elad Eyal <elad.eyal@intel.com>
|
15
|
-
Boaz Segev <bo@bowild.com>
|
16
|
-
Tao Luo <luotao.ruby@gmail.com>
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
TargetRubyVersion: 2.4
|
3
|
-
DisplayCopNames: true
|
4
|
-
|
5
|
-
Layout/HashAlignment:
|
6
|
-
Enabled: false
|
7
|
-
|
8
|
-
Layout/LineLength:
|
9
|
-
Max: 128
|
10
|
-
|
11
|
-
Layout/SpaceAroundMethodCallOperator:
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
Layout/SpaceInsideBlockBraces:
|
15
|
-
Enabled: false
|
16
|
-
|
17
|
-
Style/IfUnlessModifier:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
Style/UnpackFirst:
|
21
|
-
Enabled: false
|
22
|
-
|
23
|
-
#
|
24
|
-
# Lint
|
25
|
-
#
|
26
|
-
|
27
|
-
Lint/SuppressedException:
|
28
|
-
Enabled: false
|
29
|
-
|
30
|
-
Lint/Loop:
|
31
|
-
Enabled: false
|
32
|
-
|
33
|
-
Lint/RaiseException:
|
34
|
-
Enabled: false
|
35
|
-
|
36
|
-
Lint/StructNewOverride:
|
37
|
-
Enabled: false
|
38
|
-
#
|
39
|
-
# Metrics
|
40
|
-
#
|
41
|
-
|
42
|
-
Metrics/AbcSize:
|
43
|
-
Max: 35
|
44
|
-
|
45
|
-
Metrics/BlockLength:
|
46
|
-
Max: 128
|
47
|
-
Enabled: false
|
48
|
-
|
49
|
-
Metrics/ClassLength:
|
50
|
-
Max: 128
|
51
|
-
|
52
|
-
Metrics/MethodLength:
|
53
|
-
CountComments: false
|
54
|
-
Max: 50
|
55
|
-
|
56
|
-
Metrics/CyclomaticComplexity:
|
57
|
-
Max: 15
|
58
|
-
|
59
|
-
Metrics/PerceivedComplexity:
|
60
|
-
Max: 15
|
61
|
-
|
62
|
-
#
|
63
|
-
# Style
|
64
|
-
#
|
65
|
-
|
66
|
-
Style/ExponentialNotation:
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
Style/FormatStringToken:
|
70
|
-
Enabled: false
|
71
|
-
|
72
|
-
Style/FrozenStringLiteralComment:
|
73
|
-
Enabled: true
|
74
|
-
|
75
|
-
Style/GlobalVars:
|
76
|
-
Enabled: false
|
77
|
-
|
78
|
-
Style/HashEachMethods:
|
79
|
-
Enabled: false
|
80
|
-
|
81
|
-
Style/HashTransformKeys:
|
82
|
-
Enabled: false
|
83
|
-
|
84
|
-
Style/HashTransformValues:
|
85
|
-
Enabled: false
|
86
|
-
|
87
|
-
Style/NumericPredicate:
|
88
|
-
Enabled: false
|
89
|
-
|
90
|
-
Style/RescueModifier:
|
91
|
-
Enabled: false
|
92
|
-
|
93
|
-
Style/SafeNavigation:
|
94
|
-
Enabled: false
|
95
|
-
|
96
|
-
Style/StringLiterals:
|
97
|
-
EnforcedStyle: double_quotes
|
98
|
-
|
99
|
-
Style/TrivialAccessors:
|
100
|
-
Enabled: false
|
data/Gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gemspec
|
6
|
-
|
7
|
-
gem "jruby-openssl" if defined? JRUBY_VERSION
|
8
|
-
|
9
|
-
group :maintenance, optional: true do
|
10
|
-
gem "bake"
|
11
|
-
gem "bake-gem"
|
12
|
-
# gem "bake-modernize"
|
13
|
-
end
|
14
|
-
|
15
|
-
group :development, :test do
|
16
|
-
gem "rake-compiler", "~> 1.1.9", require: false
|
17
|
-
gem "rspec", "~> 3.7", require: false
|
18
|
-
gem "rubocop", "0.82.0", require: false
|
19
|
-
end
|
data/Rakefile
DELETED
data/examples/echo_server.rb
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
# Released under the MIT License.
|
5
|
-
# Copyright, 2012-2016, by Tony Arcieri.
|
6
|
-
# Copyright, 2016, by Jun Aruga.
|
7
|
-
# Copyright, 2019, by Zhang Kang.
|
8
|
-
# Copyright, 2020, by Thomas Dziedzic.
|
9
|
-
# Copyright, 2023, by Samuel Williams.
|
10
|
-
|
11
|
-
$LOAD_PATH.push File.expand_path("../lib", __dir__)
|
12
|
-
require "nio"
|
13
|
-
require "socket"
|
14
|
-
|
15
|
-
# Echo server example written with nio4r
|
16
|
-
class EchoServer
|
17
|
-
def initialize(host, port)
|
18
|
-
@selector = NIO::Selector.new
|
19
|
-
|
20
|
-
puts "Listening on #{host}:#{port}"
|
21
|
-
@server = TCPServer.new(host, port)
|
22
|
-
|
23
|
-
monitor = @selector.register(@server, :r)
|
24
|
-
monitor.value = proc { accept }
|
25
|
-
end
|
26
|
-
|
27
|
-
def run
|
28
|
-
loop do
|
29
|
-
@selector.select { |monitor| monitor.value.call }
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def accept
|
34
|
-
socket = @server.accept
|
35
|
-
_, port, host = socket.peeraddr
|
36
|
-
puts "*** #{host}:#{port} connected"
|
37
|
-
|
38
|
-
monitor = @selector.register(socket, :r)
|
39
|
-
monitor.value = proc { read(socket) }
|
40
|
-
end
|
41
|
-
|
42
|
-
def read(socket)
|
43
|
-
data = socket.read_nonblock(4096)
|
44
|
-
socket.write_nonblock(data)
|
45
|
-
rescue EOFError
|
46
|
-
_, port, host = socket.peeraddr
|
47
|
-
puts "*** #{host}:#{port} disconnected"
|
48
|
-
|
49
|
-
@selector.deregister(socket)
|
50
|
-
socket.close
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
EchoServer.new("localhost", 1234).run if $PROGRAM_NAME == __FILE__
|
data/logo.png
DELETED
Binary file
|