Skip to content

Commit

Permalink
Update copyrights/license & funding URI.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 21, 2023
1 parent e0a163e commit 9a5a118
Show file tree
Hide file tree
Showing 22 changed files with 241 additions and 94 deletions.
16 changes: 16 additions & 0 deletions .mailmap
@@ -0,0 +1,16 @@
Sadayuki Furuhashi <frsyuki@users.sourceforge.jp>
Shannon Skipper <shannonskipper@gmail.com>
Anatol Pomozov <anatol.pomozov@gmail.com>
Hiroshi Shibata <shibata.hiroshi@gmail.com>
John Thornton <ubergeek3141@gmail.com>
Upekshe Jayasekera <usmj000@gmail.com>
Upekshe Jayasekera <upekshej.11@cse.mrt.ac.lk>
Usaku Nakamura <usa@garbagecollect.jp>
Tomoya Ishida <tomoyapenguin@gmail.com>
Tiago Cardoso <cardoso_tiago@hotmail.com>
Ravil Bayramgalin <brainopia@evilmartians.com>
Gregory Longtin <Greg.mpls@gmail.com>
Gregory Longtin <Greg.mpls@gmail.com> <MSP-Greg@users.noreply.github.com>
Elad Eyal <elad.eyal@intel.com>
Boaz Segev <bo@bowild.com>
Tao Luo <luotao.ruby@gmail.com>
7 changes: 7 additions & 0 deletions examples/echo_server.rb
@@ -1,6 +1,13 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2012-2016, by Tony Arcieri.
# Copyright, 2016, by Jun Aruga.
# Copyright, 2019, by Zhang Kang.
# Copyright, 2020, by Thomas Dziedzic.
# Copyright, 2023, by Samuel Williams.

$LOAD_PATH.push File.expand_path("../lib", __dir__)
require "nio"
require "socket"
Expand Down
14 changes: 14 additions & 0 deletions ext/nio4r/extconf.rb
@@ -1,5 +1,19 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2011-2020, by Tony Arcieri.
# Copyright, 2014, by Hiroshi Shibata.
# Copyright, 2014, by Sergey Avseyev.
# Copyright, 2015, by Daniel Berger.
# Copyright, 2017, by Jun Aruga.
# Copyright, 2017, by Usaku Nakamura.
# Copyright, 2017, by Lars Kanis.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2020, by Gregory Longtin.
# Copyright, 2020, by Boaz Segev.
# Copyright, 2020, by Joao Fernandes.
# Copyright, 2021, by Jeffrey Martin.

require "rubygems"

# Write a dummy Makefile on Windows because we use the pure Ruby implementation there
Expand Down
9 changes: 9 additions & 0 deletions lib/nio.rb
@@ -1,5 +1,14 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2011-2017, by Tony Arcieri.
# Copyright, 2013, by Stephen von Takach.
# Copyright, 2013, by Per Lundberg.
# Copyright, 2014, by Marek Kowalcze.
# Copyright, 2016, by Upekshe Jayasekera.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2021, by Jun Jiang.

require "socket"
require "nio/version"

Expand Down
6 changes: 6 additions & 0 deletions lib/nio/bytebuffer.rb
@@ -1,5 +1,11 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2016, by Upekshe Jayasekera.
# Copyright, 2016-2017, by Tony Arcieri.
# Copyright, 2020, by Thomas Dziedzic.
# Copyright, 2023, by Samuel Williams.

module NIO
# Efficient byte buffers for performant I/O operations
class ByteBuffer
Expand Down
7 changes: 7 additions & 0 deletions lib/nio/monitor.rb
@@ -1,5 +1,12 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2011-2018, by Tony Arcieri.
# Copyright, 2015, by Upekshe Jayasekera.
# Copyright, 2015, by Vladimir Kochnev.
# Copyright, 2018-2023, by Samuel Williams.
# Copyright, 2019-2020, by Gregory Longtin.

module NIO
# Monitors watch IO objects for specific events
class Monitor
Expand Down
15 changes: 15 additions & 0 deletions lib/nio/selector.rb
@@ -1,5 +1,20 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2011-2017, by Tony Arcieri.
# Copyright, 2012, by Logan Bowers.
# Copyright, 2013, by Sadayuki Furuhashi.
# Copyright, 2013, by Stephen von Takach.
# Copyright, 2013, by Tim Carey-Smith.
# Copyright, 2013, by Ravil Bayramgalin.
# Copyright, 2014, by Sergey Avseyev.
# Copyright, 2014, by John Thornton.
# Copyright, 2015, by Vladimir Kochnev.
# Copyright, 2015, by Upekshe Jayasekera.
# Copyright, 2019-2020, by Gregory Longtin.
# Copyright, 2020-2021, by Joao Fernandes.
# Copyright, 2023, by Samuel Williams.

require "set"

module NIO
Expand Down
5 changes: 5 additions & 0 deletions lib/nio/version.rb
@@ -1,5 +1,10 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2011-2018, by Tony Arcieri.
# Copyright, 2018-2023, by Samuel Williams.
# Copyright, 2023, by Tsimnuj Hawj.

module NIO
VERSION = "2.6.0"
end
4 changes: 4 additions & 0 deletions lib/nio4r.rb
@@ -1 +1,5 @@
# Released under the MIT License.
# Copyright, 2023, by Phillip Aldridge.
# Copyright, 2023, by Samuel Williams.

require_relative "nio"
86 changes: 48 additions & 38 deletions license.md
@@ -1,43 +1,53 @@
# MIT License

Copyright, 2011-2020, by Tony Arcieri.
Copyright, 2012, by Logan Bowers.
Copyright, 2013, by FURUHASHI Sadayuki.
Copyright, 2013, by Stephen von Takach.
Copyright, 2013, by Tim Carey-Smith.
Copyright, 2013, by brainopia.
Copyright, 2013, by Luis Lavena.
Copyright, 2014, by SHIBATA Hiroshi.
Copyright, 2014, by Sergey Avseyev.
Copyright, 2014, by JohnnyT.
Copyright, 2015-2017, by Tiago Cardoso.
Copyright, 2015, by Daniel Berger.
Copyright, 2015, by Upekshe.
Copyright, 2015-2016, by UpeksheJay.
Copyright, 2015, by Vladimir Kochnev.
Copyright, 2016-2018, by Jun Aruga.
Copyright, 2016, by Omer Katz.
Copyright, 2016-2021, by Olle Jonsson.
Copyright, 2017, by usa.
Copyright, 2017, by HoneyryderChuck.
Copyright, 2017, by tompng.
Copyright, 2018-2021, by Samuel Williams.
Copyright, 2019, by Cédric Boutillier.
Copyright, 2019-2020, by MSP-Greg.
Copyright, 2019-2020, by Benoit Daloze.
Copyright, 2019, by Jesús Burgos Maciá.
Copyright, 2019, by Thomas Kuntz.
Copyright, 2019, by Orien Madgwick.
Copyright, 2019, by Thomas Dziedzic.
Copyright, 2019, by Zhang Kang.
Copyright, 2020, by eladeyal-intel.
Copyright, 2020, by Pedro Paiva.
Copyright, 2020, by Bo.
Copyright, 2020, by Charles Oliver Nutter.
Copyright, 2020-2021, by Joao Fernandes.
Copyright, 2021, by Jun Jiang.
Copyright, 2021, by Jeffrey Martin.
Copyright, 2021, by Pavel Lobashov.
Copyright, 2011-2020, by Tony Arcieri.
Copyright, 2012, by Bernd Ahlers.
Copyright, 2012, by Logan Bowers.
Copyright, 2012, by Dirkjan Bussink.
Copyright, 2013, by Sadayuki Furuhashi.
Copyright, 2013, by Shannon Skipper.
Copyright, 2013, by Stephen von Takach.
Copyright, 2013, by Tim Carey-Smith.
Copyright, 2013, by Per Lundberg.
Copyright, 2013, by Ravil Bayramgalin.
Copyright, 2013, by Luis Lavena.
Copyright, 2014, by Anatol Pomozov.
Copyright, 2014, by Hiroshi Shibata.
Copyright, 2014, by Marek Kowalcze.
Copyright, 2014, by Sergey Avseyev.
Copyright, 2014, by John Thornton.
Copyright, 2015-2017, by Tiago Cardoso.
Copyright, 2015, by Daniel Berger.
Copyright, 2015-2016, by Upekshe Jayasekera.
Copyright, 2015, by Vladimir Kochnev.
Copyright, 2016-2018, by Jun Aruga.
Copyright, 2016, by Omer Katz.
Copyright, 2016, by Denis Washington.
Copyright, 2016-2021, by Olle Jonsson.
Copyright, 2017, by Tao Luo.
Copyright, 2017, by Usaku Nakamura.
Copyright, 2017-2022, by Gregory Longtin.
Copyright, 2017, by Lars Kanis.
Copyright, 2017, by Tomoya Ishida.
Copyright, 2018-2023, by Samuel Williams.
Copyright, 2019, by Cédric Boutillier.
Copyright, 2019-2020, by Benoit Daloze.
Copyright, 2019, by Jesús Burgos Maciá.
Copyright, 2019, by Thomas Kuntz.
Copyright, 2019, by Orien Madgwick.
Copyright, 2019, by Zhang Kang.
Copyright, 2020, by Thomas Dziedzic.
Copyright, 2020, by Elad Eyal.
Copyright, 2020, by Pedro Paiva.
Copyright, 2020, by Boaz Segev.
Copyright, 2020, by Charles Oliver Nutter.
Copyright, 2020-2021, by Joao Fernandes.
Copyright, 2021, by Jun Jiang.
Copyright, 2021, by Pavel Lobashov.
Copyright, 2021, by Jeffrey Martin.
Copyright, 2023, by Pavel Rosický.
Copyright, 2023, by Tsimnuj Hawj.
Copyright, 2023, by Phillip Aldridge.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion nio4r.gemspec
Expand Up @@ -25,7 +25,8 @@ Gem::Specification.new do |spec|
"changelog_uri" => "https://github.com/socketry/nio4r/blob/master/CHANGES.md",
"documentation_uri" => "https://www.rubydoc.info/gems/nio4r/#{spec.version}",
"source_code_uri" => "https://github.com/socketry/nio4r/tree/v#{spec.version}",
"wiki_uri" => "https://github.com/socketry/nio4r/wiki"
"wiki_uri" => "https://github.com/socketry/nio4r/wiki",
"funding_uri" => "https://github.com/sponsors/ioquatix/",
}

spec.required_ruby_version = ">= 2.4"
Expand Down
93 changes: 38 additions & 55 deletions readme.md
Expand Up @@ -16,93 +16,76 @@ writing.

## Projects using nio4r

* [ActionCable]: Rails 5 WebSocket protocol, uses nio4r for a WebSocket server
* [Celluloid]: Actor-based concurrency framework, uses nio4r for async I/O
* [Async]: Asynchronous I/O framework for Ruby
* [Puma]: Ruby/Rack web server built for concurrency

[ActionCable]: https://rubygems.org/gems/actioncable
[Celluloid]: https://github.com/celluloid/celluloid-io
[Async]: https://github.com/socketry/async
[Puma]: https://github.com/puma/puma
- [ActionCable](https://rubygems.org/gems/actioncable): Rails 5 WebSocket protocol, uses nio4r for a WebSocket server
- [Celluloid](https://github.com/celluloid/celluloid-io): Actor-based concurrency framework, uses nio4r for async I/O
- [Async](https://github.com/socketry/async): Asynchronous I/O framework for Ruby
- [Puma](https://github.com/puma/puma): Ruby/Rack web server built for concurrency

## Goals

* Expose high-level interfaces for stateful IO selectors
* Keep the API small to maximize both portability and performance across many
different OSes and Ruby VMs
* Provide inherently thread-safe facilities for working with IO objects
- Expose high-level interfaces for stateful IO selectors
- Keep the API small to maximize both portability and performance across many
different OSes and Ruby VMs
- Provide inherently thread-safe facilities for working with IO objects

## Supported platforms

* Ruby 2.4
* Ruby 2.5
* Ruby 2.6
* Ruby 2.7
* Ruby 3.0
* [JRuby](https://github.com/jruby/jruby)
* [TruffleRuby](https://github.com/oracle/truffleruby)
- Ruby 2.4
- Ruby 2.5
- Ruby 2.6
- Ruby 2.7
- Ruby 3.0
- [JRuby](https://github.com/jruby/jruby)
- [TruffleRuby](https://github.com/oracle/truffleruby)

## Supported backends

* **libev**: MRI C extension targeting multiple native IO selector APIs (e.g epoll, kqueue)
* **Java NIO**: JRuby extension which wraps the Java NIO subsystem
* **Pure Ruby**: `Kernel.select`-based backend that should work on any Ruby interpreter
- **libev**: MRI C extension targeting multiple native IO selector APIs (e.g epoll, kqueue)
- **Java NIO**: JRuby extension which wraps the Java NIO subsystem
- **Pure Ruby**: `Kernel.select`-based backend that should work on any Ruby interpreter

## Documentation

[Please see the nio4r wiki](https://github.com/socketry/nio4r/wiki)
for more detailed documentation and usage notes:

* [Getting Started]: Introduction to nio4r's components
* [Selectors]: monitor multiple `IO` objects for readiness events
* [Monitors]: control interests and inspect readiness for specific `IO` objects
* [Byte Buffers]: fixed-size native buffers for high-performance I/O

[Getting Started]: https://github.com/socketry/nio4r/wiki/Getting-Started
[Selectors]: https://github.com/socketry/nio4r/wiki/Selectors
[Monitors]: https://github.com/socketry/nio4r/wiki/Monitors
[Byte Buffers]: https://github.com/socketry/nio4r/wiki/Byte-Buffers
- [Getting Started](https://github.com/socketry/nio4r/wiki/Getting-Started): Introduction to nio4r's components
- [Selectors](https://github.com/socketry/nio4r/wiki/Selectors): monitor multiple `IO` objects for readiness events
- [Monitors](https://github.com/socketry/nio4r/wiki/Monitors): control interests and inspect readiness for specific `IO` objects
- [Byte Buffers](https://github.com/socketry/nio4r/wiki/Byte-Buffers): fixed-size native buffers for high-performance I/O

See also:

* [YARD API documentation](http://www.rubydoc.info/gems/nio4r/frames)
- [YARD API documentation](http://www.rubydoc.info/gems/nio4r/frames)

## Non-goals

**nio4r** is not a full-featured event framework like [EventMachine] or [Cool.io].
**nio4r** is not a full-featured event framework like [EventMachine](https://github.com/eventmachine/eventmachine) or [Cool.io](https://coolio.github.io/).
Instead, nio4r is the sort of thing you might write a library like that on
top of. nio4r provides a minimal API such that individual Ruby implementers
may choose to produce optimized versions for their platform, without having
to maintain a large codebase.

[EventMachine]: https://github.com/eventmachine/eventmachine
[Cool.io]: https://coolio.github.io/

## Releases

### CRuby

```
rake clean
rake release
```
rake clean
rake release

### JRuby

You might need to delete `Gemfile.lock` before trying to `bundle install`.

```
# Ensure you have the correct JDK:
pacman -Syu jdk-openjdk
archlinux-java set java-19-openjdk
# Ensure you are using jruby:
chruby jruby
bundle update
# Build the package:
rake clean
rake compile
rake release
```
# Ensure you have the correct JDK:
pacman -Syu jdk-openjdk
archlinux-java set java-19-openjdk

# Ensure you are using jruby:
chruby jruby
bundle update

# Build the package:
rake clean
rake compile
rake release
4 changes: 4 additions & 0 deletions spec/nio/acceptables_spec.rb
@@ -1,5 +1,9 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2012-2017, by Tony Arcieri.
# Copyright, 2019-2023, by Samuel Williams.

require "spec_helper"

RSpec.describe "NIO acceptables" do
Expand Down
6 changes: 6 additions & 0 deletions spec/nio/bytebuffer_spec.rb
@@ -1,5 +1,11 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2016, by Upekshe Jayasekera.
# Copyright, 2016-2017, by Tony Arcieri.
# Copyright, 2019-2023, by Samuel Williams.
# Copyright, 2020, by Thomas Dziedzic.

require "spec_helper"

RSpec.describe NIO::ByteBuffer do
Expand Down
7 changes: 7 additions & 0 deletions spec/nio/monitor_spec.rb
@@ -1,5 +1,12 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2011-2018, by Tony Arcieri.
# Copyright, 2012, by Logan Bowers.
# Copyright, 2015, by Tiago Cardoso.
# Copyright, 2015, by Upekshe Jayasekera.
# Copyright, 2018-2023, by Samuel Williams.

require "spec_helper"
require "socket"

Expand Down

0 comments on commit 9a5a118

Please sign in to comment.