From 9b1953881582c621ae4d66d8dc5ee450ab904e63 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 24 Apr 2024 14:36:09 +1200 Subject: [PATCH] Modernize gem. --- .editorconfig | 4 ++++ .github/workflows/coverage.yaml | 10 +++++----- .github/workflows/documentation.yaml | 11 ++++------- .github/workflows/test-external.yaml | 4 ++-- .github/workflows/test.yaml | 4 ++-- lib/protocol/rack/adapter.rb | 2 +- lib/protocol/rack/adapter/generic.rb | 2 +- lib/protocol/rack/adapter/rack2.rb | 2 +- lib/protocol/rack/adapter/rack3.rb | 2 +- lib/protocol/rack/constants.rb | 2 +- lib/protocol/rack/input.rb | 2 +- lib/protocol/rack/response.rb | 2 +- lib/protocol/rack/version.rb | 2 +- license.md | 2 +- protocol-rack.gemspec | 7 ++++++- readme.md | 2 +- test/protocol/rack/adapter.rb | 2 +- test/protocol/rack/input.rb | 2 +- test/protocol/rack/request.rb | 2 +- 19 files changed, 36 insertions(+), 30 deletions(-) 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 575fbac..ac5ec55 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -22,7 +22,7 @@ jobs: - ubuntu ruby: - - "3.2" + - "3.3" gemfile: - gems/rack-v1.rb @@ -30,7 +30,7 @@ jobs: - gems/rack-v3.rb steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{matrix.ruby}} @@ -40,7 +40,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 @@ -50,10 +50,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 cbff675..21898f5 100644 --- a/.github/workflows/test-external.yaml +++ b/.github/workflows/test-external.yaml @@ -20,12 +20,12 @@ jobs: - macos ruby: - - "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 e3c6a36..46062e0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,9 +23,9 @@ jobs: - macos ruby: - - "3.0" - "3.1" - "3.2" + - "3.3" gemfile: - gems/rack-v1.rb @@ -46,7 +46,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/lib/protocol/rack/adapter.rb b/lib/protocol/rack/adapter.rb index 28ef0bb..05ec2f8 100644 --- a/lib/protocol/rack/adapter.rb +++ b/lib/protocol/rack/adapter.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'rack' diff --git a/lib/protocol/rack/adapter/generic.rb b/lib/protocol/rack/adapter/generic.rb index 01eb6c4..c91261a 100644 --- a/lib/protocol/rack/adapter/generic.rb +++ b/lib/protocol/rack/adapter/generic.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'console' diff --git a/lib/protocol/rack/adapter/rack2.rb b/lib/protocol/rack/adapter/rack2.rb index 4335175..f75a997 100644 --- a/lib/protocol/rack/adapter/rack2.rb +++ b/lib/protocol/rack/adapter/rack2.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'console' diff --git a/lib/protocol/rack/adapter/rack3.rb b/lib/protocol/rack/adapter/rack3.rb index 75c5761..6177a25 100644 --- a/lib/protocol/rack/adapter/rack3.rb +++ b/lib/protocol/rack/adapter/rack3.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 'console' diff --git a/lib/protocol/rack/constants.rb b/lib/protocol/rack/constants.rb index 355547c..8206b22 100644 --- a/lib/protocol/rack/constants.rb +++ b/lib/protocol/rack/constants.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. module Protocol module Rack diff --git a/lib/protocol/rack/input.rb b/lib/protocol/rack/input.rb index d67f4a2..ffe8762 100644 --- a/lib/protocol/rack/input.rb +++ b/lib/protocol/rack/input.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. # Copyright, 2023, by Genki Takiuchi. require 'protocol/http/body/stream' diff --git a/lib/protocol/rack/response.rb b/lib/protocol/rack/response.rb index d91bcc3..3cbf44b 100644 --- a/lib/protocol/rack/response.rb +++ b/lib/protocol/rack/response.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_relative 'body' require_relative 'constants' diff --git a/lib/protocol/rack/version.rb b/lib/protocol/rack/version.rb index d28c850..1c2e389 100644 --- a/lib/protocol/rack/version.rb +++ b/lib/protocol/rack/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. module Protocol module Rack diff --git a/license.md b/license.md index 782bce7..c72f8c6 100644 --- a/license.md +++ b/license.md @@ -1,6 +1,6 @@ # MIT License -Copyright, 2022-2023, by Samuel Williams. +Copyright, 2022-2024, by Samuel Williams. Copyright, 2023, by Genki Takiuchi. Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/protocol-rack.gemspec b/protocol-rack.gemspec index 0f646f3..139363e 100644 --- a/protocol-rack.gemspec +++ b/protocol-rack.gemspec @@ -15,9 +15,14 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/socketry/protocol-rack" + spec.metadata = { + "documentation_uri" => "https://socketry.github.io/protocol-rack/", + "source_code_uri" => "https://github.com/socketry/protocol-rack.git", + } + spec.files = Dir.glob(['{lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__) - spec.required_ruby_version = ">= 3.0" + spec.required_ruby_version = ">= 3.1" spec.add_dependency "protocol-http", "~> 0.23" spec.add_dependency "rack", ">= 1.0" diff --git a/readme.md b/readme.md index 0a37595..96c9da6 100644 --- a/readme.md +++ b/readme.md @@ -77,7 +77,7 @@ This project uses the [Developer Certificate of Origin](https://developercertifi ### Contributor Covenant -This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms. +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 diff --git a/test/protocol/rack/adapter.rb b/test/protocol/rack/adapter.rb index 07770f6..ccb31c3 100644 --- a/test/protocol/rack/adapter.rb +++ b/test/protocol/rack/adapter.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. require 'rack/lint' diff --git a/test/protocol/rack/input.rb b/test/protocol/rack/input.rb index 5d56d12..c9b03a3 100644 --- a/test/protocol/rack/input.rb +++ b/test/protocol/rack/input.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2022-2023, by Samuel Williams. +# Copyright, 2022-2024, by Samuel Williams. # Copyright, 2023, by Genki Takiuchi. require 'protocol/rack/input' diff --git a/test/protocol/rack/request.rb b/test/protocol/rack/request.rb index d86c8c6..8c479b8 100644 --- a/test/protocol/rack/request.rb +++ b/test/protocol/rack/request.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 'protocol/rack/request' require 'protocol/rack/adapter'