diff --git a/.editorconfig b/.editorconfig index 538ba2b..a6e7d26 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,3 +3,7 @@ root = true [*] indent_style = tab indent_size = 2 + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 81f3c65..68adbf2 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -21,10 +21,10 @@ jobs: - macos ruby: - - "3.2" + - "3.3" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} @@ -34,7 +34,7 @@ jobs: timeout-minutes: 5 run: bundle exec bake test - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: coverage-${{matrix.os}}-${{matrix.ruby}} path: .covered.db @@ -44,10 +44,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2" + ruby-version: "3.3" bundler-cache: true - uses: actions/download-artifact@v3 diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 3d483fc..8dc5227 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -5,9 +5,6 @@ on: branches: - main - # Allows you to run this workflow manually from the Actions tab: - workflow_dispatch: - # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages: permissions: contents: read @@ -28,11 +25,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2" + ruby-version: "3.3" bundler-cache: true - name: Installing packages @@ -43,7 +40,7 @@ jobs: run: bundle exec bake utopia:project:static --force no - name: Upload documentation artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: path: docs @@ -58,4 +55,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v3 diff --git a/.github/workflows/test-external.yaml b/.github/workflows/test-external.yaml index 214149c..7516fa7 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -24,9 +24,10 @@ jobs: - "3.0" - "3.1" - "3.2" + - "3.3" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5c765b6..0769a98 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,10 +21,9 @@ jobs: - macos ruby: - - "2.7" - - "3.0" - "3.1" - "3.2" + - "3.3" experimental: [false] @@ -40,7 +39,7 @@ jobs: experimental: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} diff --git a/async-io.gemspec b/async-io.gemspec index 85ce5d1..8f417e0 100644 --- a/async-io.gemspec +++ b/async-io.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.version = Async::IO::VERSION spec.summary = "Provides support for asynchonous TCP, UDP, UNIX and SSL sockets." - spec.authors = ["Samuel Williams", "Olle Jonsson", "Benoit Daloze", "Thibaut Girka", "Janko Marohnić", "Aurora Nockert", "Bruno Sutic", "Cyril Roelandt", "Hal Brodigan", "Jiang Jinyang"] + spec.authors = ["Samuel Williams", "Olle Jonsson", "Benoit Daloze", "Thibaut Girka", "Hal Brodigan", "Janko Marohnić", "Aurora Nockert", "Bruno Sutic", "Cyril Roelandt", "Hasan Kumar", "Jiang Jinyang", "Maruth Goyal", "Patrik Wenger"] spec.license = "MIT" spec.cert_chain = ['release.cert'] @@ -15,16 +15,14 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/socketry/async-io" + spec.metadata = { + "documentation_uri" => "https://socketry.github.io/async-io/", + "source_code_uri" => "https://github.com/socketry/async-io.git", + } + spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__) spec.required_ruby_version = ">= 2.5" spec.add_dependency "async" - - spec.add_development_dependency "async-container", "~> 0.15" - spec.add_development_dependency "async-rspec", "~> 1.10" - spec.add_development_dependency "bake" - spec.add_development_dependency "covered" - spec.add_development_dependency "rack-test" - spec.add_development_dependency "rspec", "~> 3.6" end diff --git a/conduct.md b/conduct.md deleted file mode 100644 index 45d257b..0000000 --- a/conduct.md +++ /dev/null @@ -1,133 +0,0 @@ - -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[INSERT CONTACT METHOD]. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/examples/ssl/client.rb b/examples/ssl/client.rb index 06cf5eb..5a8e2c6 100644 --- a/examples/ssl/client.rb +++ b/examples/ssl/client.rb @@ -1,4 +1,8 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2023, by Hal Brodigan. require 'async' require 'async/io' diff --git a/examples/ssl/server.rb b/examples/ssl/server.rb index 8233ece..792f512 100644 --- a/examples/ssl/server.rb +++ b/examples/ssl/server.rb @@ -1,4 +1,8 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2023, by Hal Brodigan. require 'async' require 'async/io' diff --git a/gems.rb b/gems.rb index 6b136d4..80d6801 100644 --- a/gems.rb +++ b/gems.rb @@ -17,10 +17,17 @@ end group :test do + gem "rspec", "~> 3.6" + gem "async-rspec", "~> 1.10" + gem "covered" + + gem "bake" gem "bake-test" gem "bake-test-external" gem 'benchmark-ips' gem 'http' + gem "async-container", "~> 0.15" + gem "rack-test" end diff --git a/lib/async/io.rb b/lib/async/io.rb index 683b7ed..22b7ddf 100644 --- a/lib/async/io.rb +++ b/lib/async/io.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2017-2023, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. require 'async' diff --git a/lib/async/io/endpoint.rb b/lib/async/io/endpoint.rb index 1e0db12..49a9f98 100644 --- a/lib/async/io/endpoint.rb +++ b/lib/async/io/endpoint.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2017-2023, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. # Copyright, 2019, by Olle Jonsson. require_relative 'address' diff --git a/lib/async/io/generic.rb b/lib/async/io/generic.rb index b748dd0..8a20137 100644 --- a/lib/async/io/generic.rb +++ b/lib/async/io/generic.rb @@ -3,6 +3,7 @@ # Released under the MIT License. # Copyright, 2017-2023, by Samuel Williams. # Copyright, 2021, by Aurora Nockert. +# Copyright, 2023, by Patrik Wenger. require 'async/wrapper' require 'forwardable' diff --git a/lib/async/io/shared_endpoint.rb b/lib/async/io/shared_endpoint.rb index c5dd76b..a929459 100644 --- a/lib/async/io/shared_endpoint.rb +++ b/lib/async/io/shared_endpoint.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2023, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. # Copyright, 2019, by Olle Jonsson. require_relative 'endpoint' diff --git a/lib/async/io/ssl_endpoint.rb b/lib/async/io/ssl_endpoint.rb index b088ee7..b58da57 100644 --- a/lib/async/io/ssl_endpoint.rb +++ b/lib/async/io/ssl_endpoint.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2023, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. # Copyright, 2019, by Olle Jonsson. require_relative 'host_endpoint' diff --git a/lib/async/io/stream.rb b/lib/async/io/stream.rb index b0523b3..baeebc8 100644 --- a/lib/async/io/stream.rb +++ b/lib/async/io/stream.rb @@ -4,6 +4,7 @@ # Copyright, 2017-2023, by Samuel Williams. # Copyright, 2018, by Janko Marohnić. # Copyright, 2021, by Aurora Nockert. +# Copyright, 2023, by Maruth Goyal. require_relative 'buffer' require_relative 'generic' diff --git a/lib/async/io/unix_endpoint.rb b/lib/async/io/unix_endpoint.rb index 3b586e8..e993a2d 100644 --- a/lib/async/io/unix_endpoint.rb +++ b/lib/async/io/unix_endpoint.rb @@ -3,6 +3,7 @@ # Released under the MIT License. # Copyright, 2019-2023, by Samuel Williams. # Copyright, 2019, by Olle Jonsson. +# Copyright, 2023, by Hasan Kumar. require_relative 'address_endpoint' diff --git a/lib/async/io/version.rb b/lib/async/io/version.rb index b6ecc54..8b9784c 100644 --- a/lib/async/io/version.rb +++ b/lib/async/io/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2017-2023, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. module Async module IO diff --git a/license.md b/license.md index 22d8d6f..e4486b9 100644 --- a/license.md +++ b/license.md @@ -1,7 +1,7 @@ # MIT License -Copyright, 2017-2023, by Samuel Williams. -Copyright, 2017-2021, by Olle Jonsson. +Copyright, 2017-2024, by Samuel Williams. +Copyright, 2017-2023, by Olle Jonsson. Copyright, 2018, by Janko Marohnić. Copyright, 2018, by Jiang Jinyang. Copyright, 2018, by Thibaut Girka. @@ -9,7 +9,10 @@ Copyright, 2019-2020, by Benoit Daloze. Copyright, 2020, by Cyril Roelandt. Copyright, 2020, by Bruno Sutic. Copyright, 2021, by Aurora Nockert. -Copyright, 2022, by Hal Brodigan. +Copyright, 2022-2023, by Hal Brodigan. +Copyright, 2023, by Hasan Kumar. +Copyright, 2023, by Maruth Goyal. +Copyright, 2023, by Patrik Wenger. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/readme.md b/readme.md index c2fbf52..4805fad 100644 --- a/readme.md +++ b/readme.md @@ -135,6 +135,14 @@ We welcome contributions to this project. 4. Push to the branch (`git push origin my-new-feature`). 5. Create new Pull Request. +### Developer Certificate of Origin + +This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted. + +### Contributor Covenant + +This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms. + ## See Also - [async](https://github.com/socketry/async) — Asynchronous event-driven reactor. diff --git a/spec/async/io/generic_spec.rb b/spec/async/io/generic_spec.rb index 3054fff..d46c556 100644 --- a/spec/async/io/generic_spec.rb +++ b/spec/async/io/generic_spec.rb @@ -2,6 +2,7 @@ # Released under the MIT License. # Copyright, 2017-2023, by Samuel Williams. +# Copyright, 2023, by Patrik Wenger. require 'async/io' require 'async/clock' diff --git a/spec/async/io/shared_endpoint_spec.rb b/spec/async/io/shared_endpoint_spec.rb index 1827c0f..03333ec 100644 --- a/spec/async/io/shared_endpoint_spec.rb +++ b/spec/async/io/shared_endpoint_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2023, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. require 'async/io/host_endpoint' require 'async/io/shared_endpoint' diff --git a/spec/async/io/stream_spec.rb b/spec/async/io/stream_spec.rb index 0104a28..9b5f18c 100644 --- a/spec/async/io/stream_spec.rb +++ b/spec/async/io/stream_spec.rb @@ -5,6 +5,8 @@ # Copyright, 2018, by Janko Marohnić. # Copyright, 2019, by Benoit Daloze. # Copyright, 2021, by Aurora Nockert. +# Copyright, 2023, by Maruth Goyal. +# Copyright, 2023, by Olle Jonsson. require 'async/io' require 'async/io/socket' diff --git a/spec/async/io/unix_endpoint_spec.rb b/spec/async/io/unix_endpoint_spec.rb index ff4e58e..ac4fa73 100644 --- a/spec/async/io/unix_endpoint_spec.rb +++ b/spec/async/io/unix_endpoint_spec.rb @@ -2,6 +2,7 @@ # Released under the MIT License. # Copyright, 2019-2023, by Samuel Williams. +# Copyright, 2023, by Hasan Kumar. require 'async/io/unix_endpoint' require 'async/io/stream'