From 672ba467bd47c4750e8320953d3b1fbff33d5445 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 3 Jan 2024 16:50:49 +1300 Subject: [PATCH] Modernize gem. --- .editorconfig | 4 + .github/workflows/coverage.yaml | 10 +- .github/workflows/documentation.yaml | 8 +- .github/workflows/test-external.yaml | 2 +- .github/workflows/test.yaml | 2 +- .mailmap | 1 + async.gemspec | 14 +-- conduct.md | 133 --------------------------- gems.rb | 12 ++- lib/async/scheduler.rb | 2 +- lib/async/task.rb | 3 +- lib/async/version.rb | 2 +- license.md | 7 +- readme.md | 11 ++- test/async/children.rb | 3 +- test/async/scheduler.rb | 2 +- test/async/task.rb | 4 +- test/async/variable.rb | 2 +- test/fiber.rb | 2 +- test/io.rb | 2 +- test/kernel.rb | 2 +- 21 files changed, 59 insertions(+), 169 deletions(-) delete mode 100644 conduct.md diff --git a/.editorconfig b/.editorconfig index 538ba2b2..a6e7d262 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 1a48aa6f..0502cbb2 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -29,9 +29,9 @@ jobs: - os: ubuntu ruby: "3.3" selector: URing - + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install packages (Ubuntu) if: matrix.os == 'ubuntu' @@ -49,7 +49,7 @@ jobs: IO_EVENT_SELECTOR: ${{matrix.selector}} 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 @@ -59,10 +59,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 3d483fc8..f5474c92 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -28,11 +28,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 +43,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 +58,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 4feb08c9..c12f37fd 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -24,7 +24,7 @@ jobs: - "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 f17ef0b0..0769a983 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,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/.mailmap b/.mailmap index 142391dd..339f44a5 100644 --- a/.mailmap +++ b/.mailmap @@ -5,3 +5,4 @@ Sokolov Yura Masafumi Okura Masayuki Yamamoto Leon Löchner <60091705+leonnicolas@users.noreply.github.com> +Math Ieu diff --git a/async.gemspec b/async.gemspec index 03cadcd0..7736cf68 100644 --- a/async.gemspec +++ b/async.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.version = Async::VERSION spec.summary = "A concurrency framework for Ruby." - spec.authors = ["Samuel Williams", "Bruno Sutic", "Jeremy Jung", "Devin Christensen", "Kent Gruber", "Brian Morearty", "Colin Kelley", "Jiang Jinyang", "Julien Portalier", "Jun Jiang", "Ken Muryoi", "Leon Löchner", "Masafumi Okura", "Masayuki Yamamoto", "Olle Jonsson", "Patrik Wenger", "Ryan Musgrave", "Salim Semaoune", "Shannon Skipper", "Sokolov Yura", "Stefan Wrobel", "Trevor Turk"] + spec.authors = ["Samuel Williams", "Bruno Sutic", "Jeremy Jung", "Olle Jonsson", "Devin Christensen", "Emil Tin", "Kent Gruber", "Brian Morearty", "Colin Kelley", "Gert Goet", "Jiang Jinyang", "Julien Portalier", "Jun Jiang", "Ken Muryoi", "Leon Löchner", "Masafumi Okura", "Masayuki Yamamoto", "Math Ieu", "Patrik Wenger", "Ryan Musgrave", "Salim Semaoune", "Shannon Skipper", "Sokolov Yura", "Stefan Wrobel", "Trevor Turk"] spec.license = "MIT" spec.cert_chain = ['release.cert'] @@ -15,7 +15,9 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/socketry/async" - spec.metadata["documentation_uri"] = "https://socketry.github.io/async/" + spec.metadata = { + "documentation_uri" => "https://socketry.github.io/async/", + } spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__) @@ -25,12 +27,4 @@ Gem::Specification.new do |spec| spec.add_dependency "fiber-annotation" spec.add_dependency "io-event", "~> 1.1" spec.add_dependency "timers", "~> 4.1" - - spec.add_development_dependency "bake-test" - spec.add_development_dependency "bake-test-external" - spec.add_development_dependency "benchmark-ips" - spec.add_development_dependency "bundler" - spec.add_development_dependency "covered", "~> 0.18.3" - spec.add_development_dependency "sus", "~> 0.15" - spec.add_development_dependency "sus-fixtures-async" end diff --git a/conduct.md b/conduct.md deleted file mode 100644 index 45d257b2..00000000 --- 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/gems.rb b/gems.rb index 22c25660..38d66263 100644 --- a/gems.rb +++ b/gems.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2022, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. +# Copyright, 2017, by Kent Gruber. source 'https://rubygems.org' @@ -16,3 +17,12 @@ gem "bake-github-pages" gem "utopia-project" end + +group :test do + gem "bake-test" + gem "bake-test-external" + gem "benchmark-ips" + gem "covered", "~> 0.18.3" + gem "sus", "~> 0.15" + gem "sus-fixtures-async" +end diff --git a/lib/async/scheduler.rb b/lib/async/scheduler.rb index 32445b2d..05f4395d 100644 --- a/lib/async/scheduler.rb +++ b/lib/async/scheduler.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2023, by Samuel Williams. +# Copyright, 2020-2024, by Samuel Williams. # Copyright, 2020, by Jun Jiang. # Copyright, 2021, by Julien Portalier. diff --git a/lib/async/task.rb b/lib/async/task.rb index fe63bc57..d98b45fb 100644 --- a/lib/async/task.rb +++ b/lib/async/task.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2017-2023, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. # Copyright, 2017, by Kent Gruber. # Copyright, 2017, by Devin Christensen. # Copyright, 2020, by Patrik Wenger. +# Copyright, 2023, by Math Ieu. require 'fiber' diff --git a/lib/async/version.rb b/lib/async/version.rb index 90ada442..9cfeab90 100644 --- a/lib/async/version.rb +++ b/lib/async/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 VERSION = "2.7.0" diff --git a/license.md b/license.md index 6748b792..43f00728 100644 --- a/license.md +++ b/license.md @@ -1,13 +1,13 @@ # MIT License -Copyright, 2017-2023, by Samuel Williams. +Copyright, 2017-2024, by Samuel Williams. Copyright, 2017, by Kent Gruber. Copyright, 2017, by Devin Christensen. Copyright, 2018, by Sokolov Yura. Copyright, 2018, by Jiang Jinyang. Copyright, 2019, by Jeremy Jung. Copyright, 2019, by Ryan Musgrave. -Copyright, 2020, by Olle Jonsson. +Copyright, 2020-2023, by Olle Jonsson. Copyright, 2020, by Salim Semaoune. Copyright, 2020, by Brian Morearty. Copyright, 2020, by Stefan Wrobel. @@ -22,6 +22,9 @@ Copyright, 2022, by Trevor Turk. Copyright, 2022, by Masayuki Yamamoto. Copyright, 2023, by Leon Löchner. Copyright, 2023, by Colin Kelley. +Copyright, 2023, by Math Ieu. +Copyright, 2023, by Emil Tin. +Copyright, 2023, by Gert Goet. 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 b3ffeff5..90905a9c 100644 --- a/readme.md +++ b/readme.md @@ -7,8 +7,7 @@ Async is a composable asynchronous I/O framework for Ruby based on [io-event](ht > [tus-ruby-server](https://github.com/janko/tus-ruby-server) – would really benefit from non-blocking I/O. It's really > beautifully designed." *– [janko](https://github.com/janko)* -[![Development -Status](https://github.com/socketry/async/workflows/Test/badge.svg)](https://github.com/socketry/async/actions?workflow=Test) +[![Development Status](https://github.com/socketry/async/workflows/Test/badge.svg)](https://github.com/socketry/async/actions?workflow=Test) ## Features @@ -46,6 +45,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-io](https://github.com/socketry/async-io) — Asynchronous networking and sockets. diff --git a/test/async/children.rb b/test/async/children.rb index c1148857..6abdcb77 100644 --- a/test/async/children.rb +++ b/test/async/children.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. +# Copyright, 2017, by Kent Gruber. require 'async/node' diff --git a/test/async/scheduler.rb b/test/async/scheduler.rb index e1285de1..effec312 100644 --- a/test/async/scheduler.rb +++ b/test/async/scheduler.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2023, by Samuel Williams. +# Copyright, 2020-2024, by Samuel Williams. require 'sus/fixtures/async' require 'async/reactor' diff --git a/test/async/task.rb b/test/async/task.rb index c45905e1..eb39522d 100644 --- a/test/async/task.rb +++ b/test/async/task.rb @@ -1,7 +1,9 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2017-2023, by Samuel Williams. +# Copyright, 2017-2024, by Samuel Williams. +# Copyright, 2023, by Math Ieu. +# Copyright, 2023, by Emil Tin. require 'async' require 'async/clock' diff --git a/test/async/variable.rb b/test/async/variable.rb index 5a396ca7..0c4488fd 100644 --- a/test/async/variable.rb +++ b/test/async/variable.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2021-2024, by Samuel Williams. require 'sus/fixtures/async' require 'async/variable' diff --git a/test/fiber.rb b/test/fiber.rb index ecd2c48c..f32e3afa 100644 --- a/test/fiber.rb +++ b/test/fiber.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'async/reactor' require 'child_process' diff --git a/test/io.rb b/test/io.rb index 880d9f46..1101627c 100644 --- a/test/io.rb +++ b/test/io.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'sus/fixtures/async' diff --git a/test/kernel.rb b/test/kernel.rb index 95d98025..f53ec017 100644 --- a/test/kernel.rb +++ b/test/kernel.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'sus/fixtures/async'