From d625155af5d46b5fc0c0ee1f02639691126b77a6 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Fri, 10 Jan 2025 17:55:17 +1300 Subject: [PATCH] Modernize code. --- .github/workflows/documentation-coverage.yaml | 2 +- .github/workflows/documentation.yaml | 2 +- .github/workflows/test-coverage.yaml | 4 ++-- .github/workflows/test-external.yaml | 1 + .github/workflows/test.yaml | 1 + examples/puma/application.rb | 3 +++ examples/puma/config.ru | 2 ++ examples/puma/gems.rb | 5 +++++ examples/puma/puma.rb | 5 +++++ lib/async/container/controller.rb | 2 +- lib/async/container/error.rb | 2 +- lib/async/container/process.rb | 2 +- lib/async/container/thread.rb | 2 +- license.md | 2 +- test/async/container/.dots.rb | 2 +- test/async/container/.graceful.rb | 2 +- test/async/container/controller.rb | 2 +- test/async/container/notify/.notify.rb | 2 +- test/async/container/notify/pipe.rb | 2 +- 19 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.github/workflows/documentation-coverage.yaml b/.github/workflows/documentation-coverage.yaml index b3bac9a..8d801c5 100644 --- a/.github/workflows/documentation-coverage.yaml +++ b/.github/workflows/documentation-coverage.yaml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - name: Validate coverage diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index f5f553a..e47c6b3 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -29,7 +29,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - name: Installing packages diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 50e9293..e6dc5c3 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -21,7 +21,7 @@ jobs: - macos ruby: - - "3.3" + - "3.4" steps: - uses: actions/checkout@v4 @@ -49,7 +49,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - uses: actions/download-artifact@v4 diff --git a/.github/workflows/test-external.yaml b/.github/workflows/test-external.yaml index 21898f5..c9cc200 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -23,6 +23,7 @@ jobs: - "3.1" - "3.2" - "3.3" + - "3.4" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0769a98..5d597fa 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,6 +24,7 @@ jobs: - "3.1" - "3.2" - "3.3" + - "3.4" experimental: [false] diff --git a/examples/puma/application.rb b/examples/puma/application.rb index 3e2b196..3c6e30f 100755 --- a/examples/puma/application.rb +++ b/examples/puma/application.rb @@ -1,6 +1,9 @@ #!/usr/bin/env ruby # frozen_string_literal: true +# Released under the MIT License. +# Copyright, 2024-2025, by Samuel Williams. + require "async/container" require "console" diff --git a/examples/puma/config.ru b/examples/puma/config.ru index 815d433..acb0a83 100644 --- a/examples/puma/config.ru +++ b/examples/puma/config.ru @@ -1,3 +1,5 @@ +# frozen_string_literal: true + run do |env| [200, {"content-type" => "text/plain"}, ["Hello World #{Time.now}"]] end diff --git a/examples/puma/gems.rb b/examples/puma/gems.rb index 70ed123..604ae72 100644 --- a/examples/puma/gems.rb +++ b/examples/puma/gems.rb @@ -1,3 +1,8 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2024-2025, by Samuel Williams. + source "https://rubygems.org" gem "async-container", path: "../.." diff --git a/examples/puma/puma.rb b/examples/puma/puma.rb index e032973..cf79085 100644 --- a/examples/puma/puma.rb +++ b/examples/puma/puma.rb @@ -1,3 +1,8 @@ +# frozen_string_literal: true + +# Released under the MIT License. +# Copyright, 2024-2025, by Samuel Williams. + on_booted do require "async/container/notify" diff --git a/lib/async/container/controller.rb b/lib/async/container/controller.rb index 4d3a222..fdeb031 100644 --- a/lib/async/container/controller.rb +++ b/lib/async/container/controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2024, by Samuel Williams. +# Copyright, 2018-2025, by Samuel Williams. require_relative "error" require_relative "best" diff --git a/lib/async/container/error.rb b/lib/async/container/error.rb index adfff85..802ecfa 100644 --- a/lib/async/container/error.rb +++ b/lib/async/container/error.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2019-2024, by Samuel Williams. +# Copyright, 2019-2025, by Samuel Williams. module Async module Container diff --git a/lib/async/container/process.rb b/lib/async/container/process.rb index aa5b8cf..fa995f2 100644 --- a/lib/async/container/process.rb +++ b/lib/async/container/process.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. +# Copyright, 2020-2025, by Samuel Williams. require_relative "channel" require_relative "error" diff --git a/lib/async/container/thread.rb b/lib/async/container/thread.rb index 280ebdd..eff0497 100644 --- a/lib/async/container/thread.rb +++ b/lib/async/container/thread.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. +# Copyright, 2020-2025, by Samuel Williams. # Copyright, 2020, by Olle Jonsson. require_relative "channel" diff --git a/license.md b/license.md index 18e2661..7867ed1 100644 --- a/license.md +++ b/license.md @@ -1,6 +1,6 @@ # MIT License -Copyright, 2017-2024, by Samuel Williams. +Copyright, 2017-2025, by Samuel Williams. Copyright, 2019, by Yuji Yaginuma. Copyright, 2020, by Olle Jonsson. Copyright, 2020, by Juan Antonio Martín Lucas. diff --git a/test/async/container/.dots.rb b/test/async/container/.dots.rb index f510918..551b4fc 100755 --- a/test/async/container/.dots.rb +++ b/test/async/container/.dots.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. +# Copyright, 2020-2025, by Samuel Williams. require_relative "../../../lib/async/container/controller" diff --git a/test/async/container/.graceful.rb b/test/async/container/.graceful.rb index 87ce1dd..af2d473 100755 --- a/test/async/container/.graceful.rb +++ b/test/async/container/.graceful.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2024, by Samuel Williams. +# Copyright, 2024-2025, by Samuel Williams. require_relative "../../../lib/async/container/controller" diff --git a/test/async/container/controller.rb b/test/async/container/controller.rb index d9d29e3..ee3a9b0 100644 --- a/test/async/container/controller.rb +++ b/test/async/container/controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2024, by Samuel Williams. +# Copyright, 2018-2025, by Samuel Williams. require "async/container/controller" diff --git a/test/async/container/notify/.notify.rb b/test/async/container/notify/.notify.rb index fee8d90..4a692aa 100755 --- a/test/async/container/notify/.notify.rb +++ b/test/async/container/notify/.notify.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2024, by Samuel Williams. +# Copyright, 2020-2025, by Samuel Williams. require_relative "../../../../lib/async/container" diff --git a/test/async/container/notify/pipe.rb b/test/async/container/notify/pipe.rb index 9c841ed..8bd9072 100644 --- a/test/async/container/notify/pipe.rb +++ b/test/async/container/notify/pipe.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2020-2022, by Samuel Williams. +# Copyright, 2020-2025, by Samuel Williams. # Copyright, 2020, by Olle Jonsson. require "async/container/controller"